Skip to content

Conversation

Millmer
Copy link

@Millmer Millmer commented Sep 17, 2025

Motivation and Context

Resolves: #13131

Description

The Gemini connector actually already supports arbitrary base64 PDF content by prioritising binary data in the CreateGeminiPartFromImage function in the GeminiRequest.cs.

I kept the current behaviour with the ImageContent and AudioContent but also added explicit support for the BinaryContent KernelContent type in the GetGeminiPartFromKernelContent function 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

@Millmer Millmer requested a review from a team as a code owner September 17, 2025 12:45
@moonbox3 moonbox3 added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel documentation labels Sep 17, 2025
@Millmer
Copy link
Author

Millmer commented Sep 17, 2025

@microsoft-github-policy-service agree

@rogerbarreto
Copy link
Member

@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!

@Millmer
Copy link
Author

Millmer commented Sep 24, 2025

@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!

@Millmer
Copy link
Author

Millmer commented Oct 16, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.Net: Bug: Gemini Connector does not support BinaryContent bringing it inline with other Connectors

6 participants