Skip to content

Commit 1b32eb6

Browse files
authored
Add list of function calls and results in ToolCallSummaryMessage (#6626)
To address the comment here: #6542 (comment)
1 parent 4358dfd commit 1b32eb6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,8 @@ def default_tool_call_summary_formatter(call: FunctionCall, result: FunctionExec
12891289
chat_message=ToolCallSummaryMessage(
12901290
content=tool_call_summary,
12911291
source=agent_name,
1292+
tool_calls=[call for call, _ in normal_tool_calls],
1293+
results=[result for _, result in normal_tool_calls],
12921294
),
12931295
inner_messages=inner_messages,
12941296
)

python/packages/autogen-agentchat/src/autogen_agentchat/messages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,12 @@ class ToolCallSummaryMessage(BaseTextChatMessage):
426426

427427
type: Literal["ToolCallSummaryMessage"] = "ToolCallSummaryMessage"
428428

429+
tool_calls: List[FunctionCall]
430+
"""The tool calls that were made."""
431+
432+
results: List[FunctionExecutionResult]
433+
"""The results of the tool calls."""
434+
429435

430436
class ToolCallRequestEvent(BaseAgentEvent):
431437
"""An event signaling a request to use tools."""

0 commit comments

Comments
 (0)