Genkit Google GenAI Plugin
Project description
Google GenAI Plugin
This Genkit plugin provides a unified interface for Google AI (Gemini) and Vertex AI models, embedding, and other services.
Setup environment
uv venv
source .venv/bin/activate
pip install genkit-plugins-google-genai
Configuration
Google AI (AI Studio)
To use Google AI models, obtain an API key from Google AI Studio and set it in your environment:
export GEMINI_API_KEY='<your-api-key>'
Vertex AI (Google Cloud)
To use Vertex AI models, ensure you have a Google Cloud project and Application Default Credentials (ADC) set up:
gcloud auth application-default login
Features
Dynamic Models
The plugin automatically discovers available models from the API upon initialization. You can use any model name supported by the API (e.g., googleai/gemini-2.0-flash-exp, vertexai/gemini-1.5-pro).
Dynamic Configuration
New or experimental parameters can be passed flexibly using model_validate to bypass strict schema checks:
from genkit.plugins.google_genai import GeminiConfigSchema
config = GeminiConfigSchema.model_validate({
'temperature': 1.0,
'response_modalities': ['TEXT', 'IMAGE'],
})
Examples
For comprehensive usage examples, see py/samples/google-genai-hello/README.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genkit_plugin_google_genai-0.5.0.tar.gz.
File metadata
- Download URL: genkit_plugin_google_genai-0.5.0.tar.gz
- Upload date:
- Size: 47.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff788f1a5395e89bc74d93b1a4f50ea7cde1accf7c6bb0ffd2a0a180d325c02b
|
|
| MD5 |
6c76b534bf7616ec1e99b94e63e8129f
|
|
| BLAKE2b-256 |
3255091a4c51fd758400e7648f19e116c2d14d9b8309284e4739d0c695e9c67e
|
Provenance
The following attestation bundles were made for genkit_plugin_google_genai-0.5.0.tar.gz:
Publisher:
publish_python.yml on firebase/genkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genkit_plugin_google_genai-0.5.0.tar.gz -
Subject digest:
ff788f1a5395e89bc74d93b1a4f50ea7cde1accf7c6bb0ffd2a0a180d325c02b - Sigstore transparency entry: 912985110
- Sigstore integration time:
-
Permalink:
firebase/genkit@0c396b62b25ce64bf860535cd0e6777ed7ef93e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/firebase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_python.yml@0c396b62b25ce64bf860535cd0e6777ed7ef93e5 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file genkit_plugin_google_genai-0.5.0-py3-none-any.whl.
File metadata
- Download URL: genkit_plugin_google_genai-0.5.0-py3-none-any.whl
- Upload date:
- Size: 50.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3fcbde5ff88a7d52d2796eda487485e933e5126e347b0f5bdc4f55d18f20560
|
|
| MD5 |
1e6b7f3e5fa87427cbe1b6cead861351
|
|
| BLAKE2b-256 |
9c26323d2587fd383e6e92fc932a1f9e544a0f2f97940a62654e0029cd950a70
|
Provenance
The following attestation bundles were made for genkit_plugin_google_genai-0.5.0-py3-none-any.whl:
Publisher:
publish_python.yml on firebase/genkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genkit_plugin_google_genai-0.5.0-py3-none-any.whl -
Subject digest:
b3fcbde5ff88a7d52d2796eda487485e933e5126e347b0f5bdc4f55d18f20560 - Sigstore transparency entry: 912985207
- Sigstore integration time:
-
Permalink:
firebase/genkit@0c396b62b25ce64bf860535cd0e6777ed7ef93e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/firebase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_python.yml@0c396b62b25ce64bf860535cd0e6777ed7ef93e5 -
Trigger Event:
workflow_dispatch
-
Statement type: