Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sources field to TextMentionTermination #5106

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Leon0402
Copy link
Contributor

Why are these changes needed?

See #4807. In many practical scenarios, we only want to stop a dialog, when a specific agent says something e.g. not stop when the keyword is part of the prompt for instance. This PR allows this by adding a list of sources, where a user can specify the agent names.

Related issue number

Closes #4807

Checks

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.38%. Comparing base (34bc82e) to head (fe28aad).

Files with missing lines Patch % Lines
.../src/autogen_agentchat/conditions/_terminations.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5106      +/-   ##
==========================================
- Coverage   70.39%   70.38%   -0.02%     
==========================================
  Files         174      174              
  Lines       11014    11017       +3     
==========================================
+ Hits         7753     7754       +1     
- Misses       3261     3263       +2     
Flag Coverage Δ
unittests 70.38% <75.00%> (-0.02%) ⬇️

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.

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

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

Would be good to update the unit test to harden the code

@Leon0402 Leon0402 requested a review from ekzhu January 19, 2025 08:33
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.

Stop Conditions for specific agents only
2 participants