feat(gemini): added support for Google Gemini#32
Open
carlwilk32 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for adding Google Gemini support! Great contribution. I've left several comments with suggestions. |
amrynsky
requested changes
Mar 1, 2026
| # Edit .env and add your API keys | ||
| # ANTHROPIC_API_KEY=your_anthropic_key_here | ||
| # OPENAI_API_KEY=your_openai_key_here | ||
| # GEMINI_API_KEY=your_openai_api_key_here |
Contributor
There was a problem hiding this comment.
Let's use GOOGLE_API_KEY that is also accepted by API
Suggested change
| # GEMINI_API_KEY=your_openai_api_key_here | |
| # GOOGLE_API_KEY=your_google_ai_api_key_here |
| - **API Keys** from one or both providers: | ||
| - **Anthropic**: [console.anthropic.com](https://console.anthropic.com/) | ||
| - **OpenAI**: [platform.openai.com](https://platform.openai.com/api-keys) | ||
| - **Google Gemini**: [aistudio.google.com](https://aistudio.google.com/api-keys) |
Contributor
There was a problem hiding this comment.
Suggested change
| - **Google Gemini**: [aistudio.google.com](https://aistudio.google.com/api-keys) | |
| - **Google AI**: [aistudio.google.com](https://aistudio.google.com/api-keys) |
| **Module not found?** Run `uv sync` in the lesson directory. | ||
|
|
||
| **API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/), or both, depending on which examples you run. See [SETUP.md](SETUP.md) for details. | ||
| **API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/),[Google Gemini](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details. |
Contributor
There was a problem hiding this comment.
Suggested change
| **API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/),[Google Gemini](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details. | |
| **API errors or authentication failures?** You need API keys from [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/), [Google AI](https://aistudio.google.com/api-keys) or all of them, depending on which examples you run. See [SETUP.md](SETUP.md) for details. |
|
|
||
| # Google Vertex API Key | ||
| # Get yours at: https://aistudio.google.com/api-keys | ||
| GEMINI_API_KEY=your_openai_api_key_here |
Contributor
There was a problem hiding this comment.
let's use GOOGLE_API_KEY that takes precedence over GEMINI_API_KEY
Suggested change
| GEMINI_API_KEY=your_openai_api_key_here | |
| GOOGLE_API_KEY=your_google_ai_api_key_here |
| |  | [01_llm_call_anthropic.py](01_llm_call_anthropic.py) | Basic Claude Messages API calls | | ||
| |  | [02_llm_call_openai.py](02_llm_call_openai.py) | Basic OpenAI Responses API calls | | ||
| |  | [03_llm_call_litellm.py](03_llm_call_litellm.py) | Unified interface for any provider | | ||
| |  | [04_llm_call_gemini.py](03_llm_call_gemini.py) | Basicc Google Gemini API calls | |
Contributor
There was a problem hiding this comment.
Suggested change
| |  | [04_llm_call_gemini.py](03_llm_call_gemini.py) | Basicc Google Gemini API calls | | |
| |  | [04_llm_call_gemini.py](04_llm_call_gemini.py) | Basic Google Gemini API calls | |
| thinking_config=types.ThinkingConfig(thinking_level="low"), | ||
| system_instruction=self.system_prompt, | ||
| safety_settings=[ | ||
| types.SafetySetting( |
Contributor
There was a problem hiding this comment.
Is it really required for the simple API call?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.