Skip to content

Commit

Permalink
Remove inner message from thread M1 orchestrator (#4611)
Browse files Browse the repository at this point in the history
remove inner message from thread
  • Loading branch information
husseinmozannar authored and rysweet committed Dec 10, 2024
1 parent eaec414 commit 08f1aaf
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,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:
Expand Down

0 comments on commit 08f1aaf

Please sign in to comment.