autogen_ext.agents.file_surfer#
- class FileSurfer(name: str, model_client: ChatCompletionClient, description: str = 'An agent that can handle local files.')[source]#
Bases:
BaseChatAgent
An agent, used by MagenticOne, that acts as a local file previewer. FileSurfer can open and read a variety of common file types, and can navigate the local file hierarchy.
- DEFAULT_DESCRIPTION = 'An agent that can handle local files.'#
- DEFAULT_SYSTEM_MESSAGES = [SystemMessage(content='\n You are a helpful AI Assistant.\n When given a user query, use available functions to help the user with their request.', type='SystemMessage')]#
- async on_messages(messages: Sequence[Annotated[TextMessage | MultiModalMessage | StopMessage | HandoffMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')]], cancellation_token: CancellationToken) Response [source]#
Handles incoming messages and returns a response.
- async on_reset(cancellation_token: CancellationToken) None [source]#
Resets the agent to its initialization state.
- property produced_message_types: List[type[Annotated[TextMessage | MultiModalMessage | StopMessage | HandoffMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')]]]#
The types of messages that the agent produces.