Skip to content

Selector group chat that uses LLM to select the next speaker#3680

Merged
ekzhu merged 9 commits into
stagingfrom
selector-groupchat
Oct 8, 2024
Merged

Selector group chat that uses LLM to select the next speaker#3680
ekzhu merged 9 commits into
stagingfrom
selector-groupchat

Conversation

@ekzhu

@ekzhu ekzhu commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

A selector group chat implementation that uses LLM to select the next speaker, by default skip the previous speaker.

Resolves #3618

Summary of changes:

  1. Add SelectorGroupChat
  2. Refactored the autogen_agentchat.teams.group_chat module to use abstract base classes for both round robin and selector group chats and managers
  3. Added SelectSpekaerEvent to event logger.

Example usage:

from autogen_agentchat.agents import ToolUseAssistantAgent
from autogen_agentchat.teams.group_chat import SelectorGroupChat

travel_advisor = ToolUseAssistantAgent("Travel_Advisor", model_client=..., registered_tools=...)
hotel_agent = ToolUseAssistantAgent("Hotel_Agent", model_client=..., registered_tools=...)
flight_agent = ToolUseAssistantAgent("Flight_Agent", model_client=..., registered_tools=...)
team = SelectorGroupChat([travel_advisor, hotel_agent, flight_agent], model_client=...)
await team.run("Book a 3-day trip to new york.")

@afourney afourney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Subject to the remaining issue about keeping internal messages out of chat (#3685)

@ekzhu ekzhu merged commit 02ced7c into staging Oct 8, 2024
@ekzhu ekzhu deleted the selector-groupchat branch October 8, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants