From 8bac69d77a0f7cb24415d5c73d93de2a1845a1f5 Mon Sep 17 00:00:00 2001 From: Hussein Mozannar Date: Sun, 8 Dec 2024 23:19:13 -0800 Subject: [PATCH] remove inner message from thread --- .../_group_chat/_magentic_one/_magentic_one_orchestrator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 37eed3e5a4e..40848c16dfd 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 @@ -167,12 +167,11 @@ async def handle_start(self, message: GroupChatStart, ctx: MessageContext) -> No @event async def handle_agent_response(self, message: GroupChatAgentResponse, ctx: MessageContext) -> None: # type: ignore - self._message_thread.append(message.agent_response.chat_message) delta: List[AgentMessage] = [] if message.agent_response.inner_messages is not None: for inner_message in message.agent_response.inner_messages: - self._message_thread.append(inner_message) delta.append(inner_message) + self._message_thread.append(message.agent_response.chat_message) delta.append(message.agent_response.chat_message) if self._termination_condition is not None: