Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,7 @@ async def a_generate_function_call_reply(
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,
Expand Down
6 changes: 0 additions & 6 deletions test/agentchat/test_tool_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,10 @@ def receive(
],
"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.
"""
),
Expand Down Expand Up @@ -357,13 +354,10 @@ async def a_echo(str):
],
"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.
"""
),
Expand Down
Loading