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 last_speaker to GroupChatManager #3318

Merged
merged 5 commits into from
Aug 9, 2024
Merged

Add last_speaker to GroupChatManager #3318

merged 5 commits into from
Aug 9, 2024

Conversation

thinkall
Copy link
Collaborator

@thinkall thinkall commented Aug 7, 2024

Why are these changes needed?

Add a property last_speaker for GroupChatManger, so users can have easier access to the info of speakers. The use case is discussed in #3279

Related issue number

Closes #3279

Checks

@marklysze
Copy link
Collaborator

Thanks @thinkall, I've tested these changes and they look good.

It may me good to add it somewhere in the documentation because I don't think it will show, even in the API reference, otherwise. The other option is to create it as a function on GroupChatManager, e.g. def get_final_speaker() -> Agent, and add a docstring. If this is done, I'd suggest changing self.last_speaker to self._last_speaker.

@marklysze marklysze added the group chat/teams group-chat-related issues label Aug 8, 2024
@thinkall
Copy link
Collaborator Author

thinkall commented Aug 9, 2024

Thanks @thinkall, I've tested these changes and they look good.

It may me good to add it somewhere in the documentation because I don't think it will show, even in the API reference, otherwise. The other option is to create it as a function on GroupChatManager, e.g. def get_final_speaker() -> Agent, and add a docstring. If this is done, I'd suggest changing self.last_speaker to self._last_speaker.

Thank you very much for the suggestions, @marklysze ! I've added the docstring. Instead of get_final_speaker, I used last_speaker, as it's a property.

@sonichi sonichi added this pull request to the merge queue Aug 9, 2024
Merged via the queue into main with commit 1971f85 Aug 9, 2024
154 checks passed
@sonichi sonichi deleted the add_last_speaker branch August 9, 2024 03:12
victordibia pushed a commit that referenced this pull request Aug 28, 2024
* Add last_speaker to GroupChatManager's property

* Add docstring for last_speaker

* Format docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group chat/teams group-chat-related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting messages from the "agent" to the "groupchat manager":
4 participants