-
-
Notifications
You must be signed in to change notification settings - Fork 106
[Platform][Mistral] Add ImageUrlNormalizer
#787
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
Conversation
$contract ?? Contract::create( | ||
new ToolNormalizer(), | ||
new DocumentNormalizer(), | ||
new DocumentUrlNormalizer(), | ||
), | ||
$contract ?? MistralContract::create(), |
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.
is this described bug the same problem for all other bridges as well?
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.
@OskarStark I’m not entirely sure, but I believe that’s the case. I haven’t fully figured out how it’s supposed to work yet. What I noticed is that for all bridges without their own contract, the default contract is passed as an argument to the platform factories. Since it’s already set, Contract::create() is never called. One possible solution might be to avoid passing a default contract at all—what do you think?
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.
you mean via the bundle config, yes lets not inject the default one there, can you open a separate PR please?
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.
@OskarStark I removed the dedicated mistral contract. Once #789 is merged, this PR can also be merged and the new imageUrlNormalizer gets added directly in the platform factory. |
ImageUrlNormalizer
Thank you @franzwilding. |
The mistral platform factory gets a contract per default as an argument, so all the internal normalizers will not be used. This PR changes this by adding a custom MistralContract that will be used (like in the openAI birdge).
This PR also adds an imageUrl normalizer, since the mistral chat api supports image_urls as well.