mscraftsman / generative-ai

Gemini AI SDK for .NET and ASP.NET Core enables developers to use Google's state-of-the-art generative AI models to build AI-powered features and applications.
https://mscraftsman.github.io/generative-ai/
Apache License 2.0
55 stars 11 forks source link

Support: Gemini Pro Vision #4

Closed doggy8088 closed 7 months ago

doggy8088 commented 7 months ago

Would you support Gemini Pro Vision API in your package?

jochenkirstaetter commented 7 months ago

Hi @doggy8088

What do you mean? It is already in since the very first commit.

See tests and there in particular the files GoogleAi_GeminiProVision_Should.cs and VertexAi_GeminiProVision_Should.cs

The only change needed is to specify the model: Model.GeminiProVision and you are good to go. Hint: See the type Model which lists all model names supported by the package.

All other methods work as expected. Since release 0.9.0 there are compatibility methods for the older PaLM 2 models.

Please let me know what's missing and I'll look into it.

doggy8088 commented 7 months ago

I see. I didn't realize that. It because I don't see any example in your README.

jochenkirstaetter commented 7 months ago

Kindly look at the tests... There is everything coded with examples. Every feature and functionality has a test.

jochenkirstaetter commented 7 months ago

Dear @doggy8088

The README has been extended. Thanks for pointing this out.

doggy8088 commented 7 months ago

@jochenkirstaetter Don't you consider let TestExtensions.ReadImageFileBase64Async built-in to your library?

jochenkirstaetter commented 7 months ago

@doggy8088 yes, that's what I did today. There's going to be a Generative Content Request.AddMedia method with the next release that abstracts the handling of images. Probably tonight. Still writing the tests and checking against VertexAI. But it works with GoogleAI.

Bear with me...

doggy8088 commented 7 months ago

Nice to hear. 👍