Skip to content

A programming framework for agentic AI

Removed "Tool Call Id" from main content string. (#1471)

afourney8d1d07308a6d
diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.py
index 0aab131af..cbe7e621e 100644
--- a/autogen/agentchat/conversable_agent.py
+++ b/autogen/agentchat/conversable_agent.py
@@ -948,9 +948,7 @@ class ConversableAgent(Agent):
return False, None
def _str_for_tool_response(self, tool_response):
- func_id = tool_response.get("tool_call_id", "")
- response = tool_response.get("content", "")
- return f"Tool Call Id: {func_id}\n{response}"
+ return str(tool_response.get("content", ""))
def generate_tool_calls_reply(
self,
diff --git a/test/agentchat/test_tool_calls.py b/test/agentchat/test_tool_calls.py
index 46e4fef13..f440a5b26 100644
--- a/test/agentchat/test_tool_calls.py
+++ b/test/agentchat/test_tool_calls.py
@@ -259,13 +259,10 @@ def test_multi_tool_call():
],
"content": inspect.cleandoc(
"""
- Tool Call Id: tool_1
hello world
- Tool Call Id: tool_2
goodbye and thanks for all the fish
- Tool Call Id: tool_3
Error: Function multi_tool_call_echo not found.
"""
),
@@ -357,13 +354,10 @@ async def test_async_multi_tool_call():
],
"content": inspect.cleandoc(
"""
- Tool Call Id: tool_1
hello world
- Tool Call Id: tool_2
goodbye and thanks for all the fish
- Tool Call Id: tool_3
Error: Function multi_tool_call_echo not found.
"""
),