microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
31.9k stars 4.64k forks source link

[Feature Request]: Gemini API for .NET #2851

Closed hsm207 closed 4 months ago

hsm207 commented 4 months ago

Is your feature request related to a problem? Please describe.

I want to create agents in .NET powered by Google's Gemini API

Describe the solution you'd like

An implementation of Autogen.Gemini, like Autogen.OpenAI, I guess?

Additional context

Are there plans to build this feature?

### Tasks
- [x] Add AutoGen.Gemini package #2868
- [x] Add Vertex AI Gemini support #2868
- [x] Add Google AI Gemini support #2868
- [x] Implement GeminiChatAgent #2868
- [x] Add examples for plain text chat, multi-modal chat and function call #2868
- [x] Update website # #2917
LittleLittleCloud commented 4 months ago

Thanks for creating the request, we will support it in the next release

hsm207 commented 4 months ago

@LittleLittleCloud Is there a tentative date for when AutoGen.Net 0.0.15 will be released?

LittleLittleCloud commented 4 months ago

@hsm207 we ship a new package about every two weeks. You can consume the gemini package from nightly build once it's ready though

LittleLittleCloud commented 4 months ago

Currently, there are two ways to consume Gemini model

The detailed difference between those two can be found here. The main difference are authentication and library support, where Google AI uses api-key to authenticate the request and doesn't have an official dotnet library while Vertex AI use IAM to auth (other authentication methods also support, but using api-key from Google AI is not one of them) and has an official dotnet library Google.Cloud.AIPlatform.V1.

To support Gemini in AutoGen.Net, we can support consuming from Vertex AI first because it seems to be a quick win given that the official library is there. The support for Google AI will come later which might require manually crafting a Gemini client from rest api first