Add list of function calls and results in ToolCallSummaryMessage (#6626)

To address the comment here:
https://github.com/microsoft/autogen/issues/6542#issuecomment-2922465639
This commit is contained in:
Eric Zhu 2025-06-04 21:44:03 -07:00 committed by GitHub
parent 4358dfd5c3
commit 1b32eb660d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -1289,6 +1289,8 @@ class AssistantAgent(BaseChatAgent, Component[AssistantAgentConfig]):
chat_message=ToolCallSummaryMessage(
content=tool_call_summary,
source=agent_name,
tool_calls=[call for call, _ in normal_tool_calls],
results=[result for _, result in normal_tool_calls],
),
inner_messages=inner_messages,
)

View File

@ -426,6 +426,12 @@ class ToolCallSummaryMessage(BaseTextChatMessage):
type: Literal["ToolCallSummaryMessage"] = "ToolCallSummaryMessage"
tool_calls: List[FunctionCall]
"""The tool calls that were made."""
results: List[FunctionExecutionResult]
"""The results of the tool calls."""
class ToolCallRequestEvent(BaseAgentEvent):
"""An event signaling a request to use tools."""