From a585091406cdced19740de6e5be356222ff83e09 Mon Sep 17 00:00:00 2001 From: Fernando Bellido Pazos Date: Thu, 23 Jan 2025 11:04:35 +0100 Subject: [PATCH] Closes #5059 (#5156) Update _magentic_one_orchestrator.py In a Magentic Group Settting, if one of the Assitant Agents uses a tool it gives the following error, note this is under a FALSE reflect_on_tool variable. Making it true, wont happen, though more tokens will be consumed and it will have a worst output and the philosophy of a tool as an answer is not followed... --- .../_group_chat/_magentic_one/_magentic_one_orchestrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py index 5c5685fbb8..067efd25e8 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py @@ -460,7 +460,7 @@ class MagenticOneOrchestrator(BaseGroupChatManager): assert isinstance(m, TextMessage | ToolCallSummaryMessage) context.append(AssistantMessage(content=m.content, source=m.source)) else: - assert isinstance(m, TextMessage) or isinstance(m, MultiModalMessage) + assert isinstance(m, (TextMessage, MultiModalMessage, ToolCallSummaryMessage)) context.append(UserMessage(content=m.content, source=m.source)) return context