From 7d27d5e70f9548f46ae67b6ae36f014f10ed7210 Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Tue, 9 Jan 2024 16:39:49 -0800 Subject: [PATCH] check tool_returns (#1187) * check tool_returns * bump version to 0.2.6 --- autogen/agentchat/conversable_agent.py | 4 +++- autogen/version.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.py index a90744093e0e..5009d598aec2 100644 --- a/autogen/agentchat/conversable_agent.py +++ b/autogen/agentchat/conversable_agent.py @@ -1018,7 +1018,9 @@ def check_termination_and_human_reply( ] ) - response = {"role": "user", "content": reply, "tool_responses": tool_returns} + response = {"role": "user", "content": reply} + if tool_returns: + response["tool_responses"] = tool_returns return True, response diff --git a/autogen/version.py b/autogen/version.py index fe404ae570d5..01ef12070dc3 100644 --- a/autogen/version.py +++ b/autogen/version.py @@ -1 +1 @@ -__version__ = "0.2.5" +__version__ = "0.2.6"