feat: AgentChat.NET Group Chat Patterns: Selector, Swarm#5838
feat: AgentChat.NET Group Chat Patterns: Selector, Swarm#5838
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5838 +/- ##
==========================================
- Coverage 75.65% 70.22% -5.43%
==========================================
Files 189 262 +73
Lines 12784 14762 +1978
Branches 0 243 +243
==========================================
+ Hits 9672 10367 +695
- Misses 3112 4205 +1093
- Partials 0 190 +190
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5781c82 to
6b20bf0
Compare
There was a problem hiding this comment.
PR Overview
This pull request introduces two new group chat patterns for AgentChat.NET: Swarm and Selector, enhancing the framework's capabilities for dynamic group conversations.
- Added a Swarm group chat manager that selects speakers based on recent handoff messages.
- Implemented a Selector group chat manager using a customizable prompt and selector function.
- Updated the PromptTemplate to support formatted message templates.
Reviewed Changes
| File | Description |
|---|---|
| dotnet/src/Microsoft.AutoGen/AgentChat/GroupChat/SwarmGroupChat.cs | Implements Swarm group chat selection logic with minor error message text. |
| dotnet/src/Microsoft.AutoGen/AgentChat/Abstractions/PromptTemplate.cs | Provides templated string formatting for chat prompts. |
| dotnet/src/Microsoft.AutoGen/AgentChat/GroupChat/SelectorGroupChat.cs | Implements Selector group chat logic with customizable prompt and selector function. |
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
dotnet/src/Microsoft.AutoGen/AgentChat/GroupChat/SwarmGroupChat.cs:47
- [nitpick] Consider changing 'handoff messages' to 'handoff message' for grammatical correctness.
throw new InvalidOperationException("The first participant must be able to produce a handoff messages.");
dotnet/src/Microsoft.AutoGen/AgentChat/GroupChat/SelectorGroupChat.cs:140
- [nitpick] The word 'candidaate' appears to be misspelled; it should be 'candidate'. Additionally, confirm that the initializer syntax '[..' is intentional or replace it with valid C# syntax.
IEnumerable<string> participants = [.. from candidaate in this.groupOptions.Participants.Values
rysweet
left a comment
There was a problem hiding this comment.
so awesome! looks like we have tests for this in python - let's port them - will help as soon as I can
Closes #5803