autogen_agentchat.messages#

pydantic model autogen_agentchat.messages.BaseMessage[source]#

Bases: BaseModel

A base message.

Show JSON schema
{
   "title": "BaseMessage",
   "description": "A base message.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      }
   },
   "required": [
      "source"
   ]
}

Fields:
field source: str [Required]#

The name of the agent that sent this message.

autogen_agentchat.messages.ChatMessage = autogen_agentchat.messages.TextMessage | autogen_agentchat.messages.MultiModalMessage | autogen_agentchat.messages.StopMessage | autogen_agentchat.messages.HandoffMessage#

A message used by agents in a team.

pydantic model autogen_agentchat.messages.HandoffMessage[source]#

Bases: BaseMessage

A message requesting handoff of a conversation to another agent.

Show JSON schema
{
   "title": "HandoffMessage",
   "description": "A message requesting handoff of a conversation to another agent.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      }
   },
   "required": [
      "source",
      "content"
   ]
}

Fields:
field content: str [Required]#

The agent name to handoff the conversation to.

pydantic model autogen_agentchat.messages.MultiModalMessage[source]#

Bases: BaseMessage

A multimodal message.

Show JSON schema
{
   "title": "MultiModalMessage",
   "description": "A multimodal message.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      },
      "content": {
         "items": {
            "anyOf": [
               {
                  "type": "string"
               },
               {}
            ]
         },
         "title": "Content",
         "type": "array"
      }
   },
   "required": [
      "source",
      "content"
   ]
}

Fields:
field content: List[str | Image] [Required]#

The content of the message.

pydantic model autogen_agentchat.messages.StopMessage[source]#

Bases: BaseMessage

A message requesting stop of a conversation.

Show JSON schema
{
   "title": "StopMessage",
   "description": "A message requesting stop of a conversation.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      }
   },
   "required": [
      "source",
      "content"
   ]
}

Fields:
field content: str [Required]#

The content for the stop message.

pydantic model autogen_agentchat.messages.TextMessage[source]#

Bases: BaseMessage

A text message.

Show JSON schema
{
   "title": "TextMessage",
   "description": "A text message.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      }
   },
   "required": [
      "source",
      "content"
   ]
}

Fields:
field content: str [Required]#

The content of the message.