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

Ability to add MessageTransforms to the GroupChat's Select Speaker nested chat (speaker_selection_method='auto') #2

Merged
merged 19 commits into from
Sep 14, 2024

Conversation

marklysze
Copy link
Collaborator

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 a MessageTransforms object, or None.

Within GroupChat, the provided MessageTransforms object will be assigned to self._auto_message_transforms and used within _auto_select_speaker and a_auto_select_speaker.

The nested select speaker chat has two agents, checking_agent and speaker_selection_agent and the MessageTransforms are added to the speaker_selection_agent as that is the agent that utilises the LLM.

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

Checks

(2719)

@marklysze marklysze self-assigned this Aug 22, 2024
@marklysze marklysze added the alt-models Non-OpenAI Models / Client Classes label Aug 22, 2024
@qingyun-wu qingyun-wu closed this Aug 24, 2024
@qingyun-wu qingyun-wu deleted the selectspeakertransforms branch August 24, 2024 00:25
@marklysze marklysze restored the selectspeakertransforms branch August 24, 2024 21:11
@marklysze marklysze reopened this Aug 24, 2024
@marklysze
Copy link
Collaborator Author

@marklysze fix the code formating issue? Let me know if you need help!

Okie dokie, should be right to go!

@sonichi sonichi merged commit 7fd38dd into main Sep 14, 2024
150 of 153 checks passed
@sonichi sonichi deleted the selectspeakertransforms branch September 14, 2024 00:21
@marklysze
Copy link
Collaborator Author

Just a note - sorry, I accidentally had a local testing file in the commit. I've deleted it.

odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alt-models Non-OpenAI Models / Client Classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants