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

Re-query speaker name when multiple speaker names returned during Group Chat speaker selection #2304

Merged
merged 20 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c853cf2
Added requery_on_multiple_speaker_names to GroupChat and updated _fin…
marklysze Apr 3, 2024
9357265
Removed unnecessary comments
marklysze Apr 3, 2024
be3862a
Merge branch 'main' of https://github.com/microsoft/autogen into requ…
marklysze Apr 4, 2024
3b453e0
Update to current main
marklysze Apr 4, 2024
723ff35
Tweak error message.
marklysze Apr 5, 2024
86de80a
Comment clarity
marklysze Apr 6, 2024
6c57982
Merge remote-tracking branch 'origin/main' into requery_speaker_name_…
marklysze Apr 6, 2024
c464f45
Expanded description of Group Chat requery_on_multiple_speaker_names
marklysze Apr 6, 2024
8ec1f3d
Merge remote-tracking branch 'origin/main' into requery_speaker_name_…
marklysze Apr 23, 2024
16c547d
Reworked to two-way nested chat for speaker selection with default of…
marklysze Apr 24, 2024
4fbfbbe
Adding validation of new GroupChat attributes
marklysze Apr 24, 2024
21c5af0
Updates as per @ekzhu's suggestions
marklysze Apr 25, 2024
451b726
Merge branch 'main' into requery_speaker_name_on_multiple
marklysze Apr 25, 2024
9af50e5
Update groupchat
marklysze Apr 27, 2024
6550143
Update conversable_agent.py
marklysze Apr 27, 2024
f83ffc5
Update test_groupchat.py
marklysze Apr 27, 2024
bddf71a
Merge branch 'main' into requery_speaker_name_on_multiple
sonichi Apr 29, 2024
298d36b
Removed block for manual selection in select_speaker function.
marklysze Apr 29, 2024
7e5a44a
Catered for no-selection during manual selection mode
marklysze Apr 30, 2024
9d498ad
Merge branch 'main' into requery_speaker_name_on_multiple
marklysze Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@ def _append_oai_message(self, message: Union[Dict, str], role, conversation_id:

if message.get("role") in ["function", "tool"]:
oai_message["role"] = message.get("role")
elif "override_role" in message:
# If we have a direction to override the role then set the
# role accordingly. Used to customise the role for the
# select speaker prompt.
oai_message["role"] = message.get("override_role")
else:
oai_message["role"] = role

Expand Down
Loading
Loading