Documentation
Gemini is Google's AI model family that can be accessed directly through the Google AI Studio API.
Before you begin
Make sure that your Google Cloud account has a project with the Gemini API enabled.
Configuring Gemini
-
Get your API key from Google AI Studio.
-
Create a Kubernetes Secret that stores the API key.
kubectl create secret generic kagent-gemini -n kagent --from-literal GOOGLE_API_KEY=<your_api_key> -
Create a ModelConfig resource using the
Gemini
provider. The following Gemini models are supported:- gemini-pro - Text generation with function calling support
- gemini-pro-vision - Multimodal model for text and image processing
apiVersion: kagent.dev/v1alpha2kind: ModelConfigmetadata:name: gemini-model-confignamespace: kagentspec:apiKeySecret: kagent-geminiapiKeySecretKey: GOOGLE_API_KEYmodel: gemini-proprovider: Geminigemini: {}