.Net: Support Support BinaryContent in Gemini Connector#13140
Conversation
|
@microsoft-github-policy-service agree |
|
@Millmer please can you also add one integration test for this change, I'm happy to run that on my side and if all ok, happy to validate and merge the change. Thanks for the contribution! |
That's done @rogerbarreto, let me know if there is anything else 😄 Thanks! |
|
@rogerbarreto Any idea on when this might get in? We would like to make use of this in our project. At the moment we're having to do a conditional check just for Gemini and pass file inputs in a different way. It would be nice to have the same interface regardless of the chosen model. |
Motivation and Context
Resolves: #13131
Description
The Gemini connector actually already supports arbitrary base64 PDF content by prioritising binary data in the
CreateGeminiPartFromImagefunction in theGeminiRequest.cs.I kept the current behaviour with the
ImageContentandAudioContentbut also added explicit support for theBinaryContentKernelContent type in theGetGeminiPartFromKernelContentfunction to bring it inline with how the other connectors work.I applied the same Chat Completion Unit test as those I found in the OpenAI Connector for BinaryContent.
Contribution Checklist