-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Transform to add an agent's name into the message content #3334
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.
Thank you @marklysze for the PR! Would like to add an example of using this new transform? What about updating an existing notebook and show the differences between with and without this transform?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3334 +/- ##
===========================================
- Coverage 32.90% 21.12% -11.78%
===========================================
Files 94 95 +1
Lines 10235 10729 +494
Branches 2193 2469 +276
===========================================
- Hits 3368 2267 -1101
- Misses 6580 8313 +1733
+ Partials 287 149 -138
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.
Thank you @marklysze . LGTM!
* Initial commit with ability to add name into content with a transform * Transforms documentation * Fix transform links in documentation --------- Co-authored-by: Li Jiang <[email protected]>
The recent addition of non-OpenAI client classes has expanded the utility of AutoGen to a lot of different models through other cloud providers as well as the ability to run it with local LLMs.
However, the
name
field on each message is removed as only OpenAI can accept and utilise that field.This means that functionality, like the GroupChat's select speaker, isn't as effective as the LLM may not be able to determine which 'agent' belongs to each message.
This PR introduces a transform that can add an agent's name to the start or end of message's text content. As this is a transform, it isn't permanent and doesn't change the original message.
How it works:
Documentation to be done.
Dependency
For the GroupChat select speaker to be able to utilise this, PR #2719 needs to be merged first.
Why are these changes needed?
To provide the necessary name context for non-OpenAI inference.
Related issue number
PR #2719
Checks