Skip to content

Implement 'candidate_func' parameter to filter down the pool of candidates for selection#5954

Merged
ekzhu merged 10 commits intomicrosoft:mainfrom
Ethan0456:feature/selector-group-chat-candidate-func
Mar 17, 2025
Merged

Implement 'candidate_func' parameter to filter down the pool of candidates for selection#5954
ekzhu merged 10 commits intomicrosoft:mainfrom
Ethan0456:feature/selector-group-chat-candidate-func

Conversation

@Ethan0456
Copy link
Copy Markdown
Contributor

@Ethan0456 Ethan0456 commented Mar 15, 2025

Summary of Changes

  • Added 'candidate_func' to 'SelectorGroupChat' to narrow-down the pool of candidate speakers.
  • Introduced a test in tests/test_group_chat_endpoint.py to validate its functionality.
  • Updated the selector group chat user guide with an example demonstrating 'candidate_func'.

Why are these changes needed?

  • These changes adds a new parameter candidate_func to SelectorGroupChat that helps user narrow-down the set of agents for speaker selection, allowing users to automatically select next speaker from a smaller pool of agents.

Related issue number

Closes #5828

Checks

…dates for selection (microsoft#5828)

- Added 'candidate_func' to 'SelectorGroupChat' to narrow-down the pool of candidate speakers.
- Introduced a test in tests/test_group_chat_endpoint.py to validate its functionality.
- Updated the selector group chat user guide with an example demonstrating 'candidate_func'.

Signed-off-by: Abhijeetsingh Meena <abhijeet040403@gmail.com>
…s precedence over 'allowed_repeated_speaker' (microsoft#5828)

Signed-off-by: Abhijeetsingh Meena <abhijeet040403@gmail.com>
@Ethan0456
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@ekzhu
Copy link
Copy Markdown
Contributor

ekzhu commented Mar 16, 2025

Please follow the developer guide here: https://github.com/microsoft/autogen/blob/main/python/README.md for fixing formatting and type checking errors.

cd python/packages/autogen-agentchat
poe pyright
poe mypy
poe format
poe lint

# Do the same for python/packages/autogen-core, where the docs are.

Signed-off-by: Abhijeetsingh Meena <abhijeet040403@gmail.com>
@Ethan0456
Copy link
Copy Markdown
Contributor Author

Hi, I missed to lint the docs, sorry!

@ekzhu
Copy link
Copy Markdown
Contributor

ekzhu commented Mar 17, 2025

I fixed a bug in the select speaker flow.

@ekzhu ekzhu enabled auto-merge (squash) March 17, 2025 21:00
@ekzhu ekzhu merged commit c4e07e8 into microsoft:main Mar 17, 2025
56 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.67%. Comparing base (8f8ee04) to head (89c0127).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...gentchat/teams/_group_chat/_selector_group_chat.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5954      +/-   ##
==========================================
- Coverage   76.67%   76.67%   -0.01%     
==========================================
  Files         191      191              
  Lines       13141    13149       +8     
==========================================
+ Hits        10076    10082       +6     
- Misses       3065     3067       +2     
Flag Coverage Δ
unittests 76.67% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Ethan0456
Copy link
Copy Markdown
Contributor Author

Thanks @ekzhu, for all your help with my first PR! I really appreciate your guidance.

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.

candidate_func in SelectorGroupChat

2 participants