-
Notifications
You must be signed in to change notification settings - Fork 4.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
[Experimental] Modality Transforms #2836
Draft
WaelKarkoub
wants to merge
15
commits into
main
Choose a base branch
from
modality-transforms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lovely! |
3 tasks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2836 +/- ##
===========================================
- Coverage 33.12% 12.24% -20.89%
===========================================
Files 88 91 +3
Lines 9518 9775 +257
Branches 2037 2095 +58
===========================================
- Hits 3153 1197 -1956
- Misses 6096 8565 +2469
+ Partials 269 13 -256
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
NOTE: Do not review, I have not finished this feature just yet.
With the introduction of GPT-4o, we should expect an increase in interest in multimodal capabilities in AutoGen. This PR introduces a new transform that allows users to add image modality to any agent, with any image captioner, and will serve as the blueprint for other modalities.
Current State of Multimodality Support in AutoGen
MultimodalConversableAgent
andVisionCapability
if they want to add image support to their agents. Both of which are LLM-based image captioning.My requirements for adding multimodality support to agents:
Approaches Considered
I was contemplating between two approaches:
ModalityAdapters
: A new agent capability that sits in front of every incoming message and converts them from one modality type to another (primarily to text).Modality Transforms
: Use theTransformMessages
capability to convert messages from one modality to another.Initially, I was working on
ModalityAdapters
as it seemed promising (I documented my thought process in this pdf, I initially called itModalityTranslators
but we voted for the adapter naming convention as it fit better). However, I encountered few roadblocks that led to the decision to useTransformMessages
instead:ModalityAdapters
seemed too close toTransformMessages
, leading to unnecessary repeated code.Using
TransformMessages
is more verbose, but it has several advantages:Tasks to complete before opening this PR for review.
Tasks
Things I noticed in the codebase that made it difficult to add new modalities
Demo
Here's a screenshot of a GPT-3.5 (named "gpt_3_w_image_modality") that can identify the animal generated by Dalle 3 (ignore the double messages, Groupchat doesn't work with transform messages just yet so I had to hack it).
Here's the code that I used to test
Related issue number
Checks