Zaid Siddiqui
Zaid Siddiqui

Reputation: 83

Integrating Autogen with Gemini Pro's APi

with the release of Gemini pro model they are offering free API for token usage , but within some limit, My question is can we integrate Autogen library with New Gemini pro api

I am trying to connect with autogen somehow i am getting error of api incorrect ,use openai api, i have my config list as

config_list = [ { 'model': 'gemini-pro', 'api_key': '', },

]

Upvotes: 4

Views: 3058

Answers (3)

Dhiraj Jadhav
Dhiraj Jadhav

Reputation: 26

what version of autogen are you using, try using the latest version and specify. In the version 0.2.27

[
    {
        "model": "gemini-pro",
        "api_key": "BREMBO",
        "api_type": "google"
    }
]

Upvotes: 1

Shubham Garg
Shubham Garg

Reputation: 517

Check out this notebook: https://github.com/microsoft/autogen/blob/7265ef1a3fb194e1d3d7345e47e4dc9a30ecd6fd/notebook/agentchat_gemini.ipynb

It is using Gemini for the basic agents (AssistantAgent) but OpenAI's API for the UserProxyAgent that acts as a user on your behalf and is able to execute the code generated by other agents. This should allow you to use autogen at a much lower cost though. I tried to modify the UserProxyAgent to use only Gemini but it didn't work. There are a few good youtube tutorials like this that tell how to use open source models locally as well (if you have enough VRAM to load the model locally).

Kindly let me know if anyone is able to use it entirely with the Gemini's API Key without any local models or any other paid API. I'd really appreciate it. Thanks.

Upvotes: 3

Ali Aryan
Ali Aryan

Reputation: 11

Based on the Git Repo Autogen team still working on it to integrate: https://github.com/microsoft/autogen/actions/runs/7206902638/job/19632649657

Upvotes: 1

Related Questions