-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
group chat/teamsgroup-chat-related issuesgroup-chat-related issues
Description
Hey everyone,
Was doing some probing into why the group manager just fails to do its job and have some questions.
- on lines 153 to 156, why are we broadcasting the message to all agents?
autogen/autogen/agentchat/groupchat.py
Lines 136 to 179 in b432c1b
| def run_chat( | |
| self, | |
| messages: Optional[List[Dict]] = None, | |
| sender: Optional[Agent] = None, | |
| config: Optional[GroupChat] = None, | |
| ) -> Union[str, Dict, None]: | |
| """Run a group chat.""" | |
| if messages is None: | |
| messages = self._oai_messages[sender] | |
| message = messages[-1] | |
| speaker = sender | |
| groupchat = config | |
| for i in range(groupchat.max_round): | |
| # set the name to speaker's name if the role is not function | |
| if message["role"] != "function": | |
| message["name"] = speaker.name | |
| groupchat.messages.append(message) | |
| # broadcast the message to all agents except the speaker | |
| for agent in groupchat.agents: | |
| if agent != speaker: | |
| self.send(message, agent, request_reply=False, silent=True) | |
| if i == groupchat.max_round - 1: | |
| # the last round | |
| break | |
| try: | |
| # select the next speaker | |
| speaker = groupchat.select_speaker(speaker, self) | |
| # let the speaker speak | |
| reply = speaker.generate_reply(sender=self) | |
| except KeyboardInterrupt: | |
| # let the admin agent speak if interrupted | |
| if groupchat.admin_name in groupchat.agent_names: | |
| # admin agent is one of the participants | |
| speaker = groupchat.agent_by_name(groupchat.admin_name) | |
| reply = speaker.generate_reply(sender=self) | |
| else: | |
| # admin agent is not found in the participants | |
| raise | |
| if reply is None: | |
| break | |
| # The speaker sends the message without requesting a reply | |
| speaker.send(reply, self, request_reply=False) | |
| message = self.last_message(speaker) | |
| return True, None |
Instead of just sending the message to the selected speaker?
many server queue incoming messages. Personally I've been using LM Studio and noticed that it notes "running queued message" and runs them one by one, which may be causing some of these Local LLM group chat complications despite hacks to force chat orders.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
group chat/teamsgroup-chat-related issuesgroup-chat-related issues