-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use agentchat message types rather than core's model client message t…
…ypes (#662) * Use agentchat message types rather than core's model client message types * Merge remote-tracking branch 'origin/main' into ekzhu-tool-use-assistant
- Loading branch information
Showing
11 changed files
with
142 additions
and
83 deletions.
There are no files selected for viewing
19 changes: 16 additions & 3 deletions
19
python/packages/autogen-agentchat/src/autogen_agentchat/agents/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
from ._base_chat_agent import BaseChatAgent, ChatMessage | ||
from .coding._code_executor_agent import CodeExecutorAgent | ||
from .coding._coding_assistant_agent import CodingAssistantAgent | ||
from ._base_chat_agent import ( | ||
BaseChatAgent, | ||
ChatMessage, | ||
MultiModalMessage, | ||
StopMessage, | ||
TextMessage, | ||
ToolCallMessage, | ||
ToolCallResultMessage, | ||
) | ||
from ._code_executor_agent import CodeExecutorAgent | ||
from ._coding_assistant_agent import CodingAssistantAgent | ||
|
||
__all__ = [ | ||
"BaseChatAgent", | ||
"ChatMessage", | ||
"TextMessage", | ||
"MultiModalMessage", | ||
"ToolCallMessage", | ||
"ToolCallResultMessage", | ||
"StopMessage", | ||
"CodeExecutorAgent", | ||
"CodingAssistantAgent", | ||
] |
52 changes: 44 additions & 8 deletions
52
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_base_chat_agent.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file removed
0
python/packages/autogen-agentchat/src/autogen_agentchat/agents/coding/__init__.py
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
python/packages/autogen-agentchat/src/autogen_agentchat/teams/group_chat/_events.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from pydantic import BaseModel | ||
|
||
from ...agents import MultiModalMessage, StopMessage, TextMessage | ||
|
||
|
||
class ContentPublishEvent(BaseModel): | ||
"""An event for sharing some data. Agents receive this event should | ||
update their internal state (e.g., append to message history) with the | ||
content of the event. | ||
""" | ||
|
||
agent_message: TextMessage | MultiModalMessage | StopMessage | ||
"""The message published by the agent.""" | ||
|
||
|
||
class ContentRequestEvent(BaseModel): | ||
"""An event for requesting to publish a content event. | ||
Upon receiving this event, the agent should publish a ContentPublishEvent. | ||
""" | ||
|
||
... |
25 changes: 0 additions & 25 deletions
25
python/packages/autogen-agentchat/src/autogen_agentchat/teams/group_chat/_messages.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters