-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google Gemini API support to aisuite #181
base: main
Are you sure you want to change the base?
Conversation
Add support for Google Gemini API to `aisuite` and provide a guide. * **New Provider Implementation** - Add `GoogleGenaiProvider` class in `aisuite/providers/google_genai_provider.py` to handle Gemini API calls. - Implement `chat_completions_create`, `generate_content`, `list_models`, and `normalize_response` methods. - Handle authentication and API key management. * **Provider Factory Update** - Update `ProviderFactory` in `aisuite/provider.py` to include `GoogleGenaiProvider`. * **Documentation** - Add `guides/google_genai.md` with instructions for setting up and using the Gemini API with `aisuite`. - Update `README.md` to include the Gemini API as a supported provider and provide a brief example of how to use it. * **Dependencies** - Add `google-genai` to dependencies in `pyproject.toml`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some issues with the parsing of the name so I just changed the name to Ggenai for the class and the file.
Also the genai api doesn't accept the temperature so you must change
``**kwargs to config=types.GenerateContentConfig(**kwargs)```
in generate_content and chat_completions_create.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll take a look. Appreciate any edits as I’m not too experienced integrating apis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could i help on this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll get this tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should keep the logic in the same provider, but making it dynamic and configurable to run using main vertex SDK OR with this new genai SDK.
What do u think ??
Add support for Google Gemini API to
aisuite
and provide a guide.New Provider Implementation
GoogleGenaiProvider
class inaisuite/providers/google_genai_provider.py
to handle Gemini API calls.chat_completions_create
,generate_content
,list_models
, andnormalize_response
methods.Provider Factory Update
ProviderFactory
inaisuite/provider.py
to includeGoogleGenaiProvider
.Documentation
guides/google_genai.md
with instructions for setting up and using the Gemini API withaisuite
.README.md
to include the Gemini API as a supported provider and provide a brief example of how to use it.Dependencies
google-genai
to dependencies inpyproject.toml
.