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...
This commit is contained in:
Fernando Bellido Pazos
2025-01-23 11:04:35 +01:00
committed by GitHub
parent 3fe106621e
commit a585091406

View File

@@ -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