Skip to content

Commit

Permalink
Updates to a_resume to match resume
Browse files Browse the repository at this point in the history
  • Loading branch information
marklysze committed Aug 30, 2024
1 parent fe3a627 commit 0b048a9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions autogen/agentchat/groupchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,15 @@ async def a_resume(
if not message_speaker_agent and message["name"] == self.name:
message_speaker_agent = self

# Add previous messages to each agent (except their own messages and the last message, as we'll kick off the conversation with it)
# Add previous messages to each agent (except the last message, as we'll kick off the conversation with it)
if i != len(messages) - 1:
for agent in self._groupchat.agents:
if agent.name != message["name"]:
await self.a_send(
message, self._groupchat.agent_by_name(agent.name), request_reply=False, silent=True
)
if agent.name == message["name"]:
# An agent`s message is sent to the Group Chat Manager
agent.a_send(message, self, request_reply=False, silent=True)
else:
# Otherwise, messages are sent from the Group Chat Manager to the agent
self.a_send(message, agent, request_reply=False, silent=True)

# Add previous message to the new groupchat, if it's an admin message the name may not match so add the message directly
if message_speaker_agent:
Expand Down

0 comments on commit 0b048a9

Please sign in to comment.