-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Ability to add MessageTransforms to the GroupChat's Select Speaker nested chat (speaker_selection_method='auto') #2719
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2719 +/- ##
===========================================
- Coverage 34.36% 16.90% -17.46%
===========================================
Files 87 87
Lines 9336 9347 +11
Branches 1987 2143 +156
===========================================
- Hits 3208 1580 -1628
- Misses 5862 7705 +1843
+ Partials 266 62 -204
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me
I'll add a topic under Group Chat in the documentation on using transform messages for the select speaker nested chat. |
Okay, I've added a topic to the conversation to show how to apply Transform Messages to the speaker selection nested-chat. Let me know if there's anything else to do/change. |
This provides the ability to add MessageTransforms to the nested select speaker chat that occurs in a GroupChat when the speaker selection method is 'auto'. The MessageTransforms apply only to the messages within that nested select speaker chat (and not to the broader GroupChat chat).
The GroupChat constructor has a new, optional, parameter called
select_speaker_auto_message_transforms
that takes in aMessageTransforms
object, orNone
.Within GroupChat, the provided MessageTransforms object will be assigned to
self._auto_message_transforms
and used within_auto_select_speaker
anda_auto_select_speaker
.The nested select speaker chat has two agents,
checking_agent
andspeaker_selection_agent
and the MessageTransforms are added to thespeaker_selection_agent
as that is the agent that utilises the LLM.I have not added documentation, yet, as I wanted to have it reviewed first.
cc @Nathan-Intergral, @WebsheetPlugin
Why are these changes needed?
These changes enable greater control and flexibility of messages for speaker selection. Particularly useful for non-OpenAI models with limited context / reasoning ability.
Related issue number
Addresses #2499.
Addresses part of #2583.
I will carry forward other suggested changes in #2583 -
select_speaker_auto_compression
,select_speaker_auto_token_limit
,select_speaker_auto_token_limit
- it is useful to have these simple methods to enable message transforms without the developer having to create them, however as I test the effectiveness of the select speaker method I need more time to think through what would be most beneficial.Checks