-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Added ability to specify 'role' field for select speaker messages for Group Chats (Replaces PR #2167) #2199
Conversation
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.
Unit tests to check if the select speaker messages are indeed following the role specified
website/docs/topics/non-openai-models/best-tips-for-nonopenai-models.md
Outdated
Show resolved
Hide resolved
...s/topics/non-openai-models/cloud-mistralai_files/figure-markdown_strict/cell-11-output-2.svg
Outdated
Show resolved
Hide resolved
…models.md Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Updated to include note about being applicable when auto.
Okay, I'll add to tests |
I've added a test for this. I've also updated groupchat.py (sorry @jackgerrits!) to include a check that |
I've updated the tests to use pytest instead of try-except (as per my other PR). |
Could you please fix the conflicts? Thanks. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2199 +/- ##
===========================================
+ Coverage 37.83% 49.73% +11.90%
===========================================
Files 77 77
Lines 7766 7769 +3
Branches 1663 1801 +138
===========================================
+ Hits 2938 3864 +926
+ Misses 4579 3583 -996
- Partials 249 322 +73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
… Group Chats (Replaces PR microsoft#2167) (microsoft#2199) * Re-commit of code from PR (microsoft#2167) addressing microsoft#1861, due to wrong basing * Update website/docs/topics/non-openai-models/best-tips-for-nonopenai-models.md Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Removed unnecessary notebook images * Update conversation-patterns.ipynb Updated to include note about being applicable when auto. * Updated to include checks that the role is not blank/None. Added tests. * Changed try-except to use pytest --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Note: This replaces #2167 due to it being based on an older version of main.
Why are these changes needed?
As per feature request #1861 ("[Feature Request]: Allowing user to specify the "role" field for select speaker messages"), this PR includes changes to the GroupChat constructor to allow the user to specify the role for the select speaker messages. This addresses the issue of role names when using Mistral through Mistral.AI's API.
Changes:
role_for_select_speaker_messages
toGroupChat
constructor ingroupchat.py
Related issue number
Addresses #1861
Checks