Gemini Configuration
Configure Google Gemini to power Simili Bot’s AI capabilities.What is Gemini?
Google Gemini provides:- Text Embeddings: Convert issues to semantic vectors for similarity search
- LLM Analysis: AI-powered duplicate detection, routing, triage, and quality assessment
- Fast Processing: Cloud-based inference with minimal latency
Getting Started
1. Get API Key
- Go to Google AI Studio
- Sign in with your Google account
- Click Get API key
- Choose or create a Google Cloud project
- Copy the generated API key
2. Set Up GitHub Secret
Store your API key securely:- Go to repository Settings → Secrets and variables → Actions
- Create secret
GEMINI_API_KEY - Paste your API key
3. Configure Simili Bot
Add tosimili.yaml:
Configuration Reference
Embedding Settings
| Property | Type | Description | Default | Required |
|---|---|---|---|---|
provider | string | Must be “gemini” | - | Yes |
api_key | string | API key from Google AI Studio | - | Yes |
model | string | Embedding model to use | text-embedding-004 | No |
dimensions | number | Vector dimensions | 768 | No |
batch_size | number | Vectors per batch | 100 | No |
Available Models
| Model | Dimensions | Use Case | Cost |
|---|---|---|---|
text-embedding-004 | 768 | General purpose (recommended) | $0.025 per million tokens |
Pricing
Google Gemini offers a free tier: Free Tier:- Embeddings: 50 requests per minute
- LLM: 15 requests per minute
- Generous monthly quotas
- Pay-as-you-go pricing
- No monthly minimum
- Bulk discounts available
- Embeddings: ~$0.01-0.05
- LLM analysis: $0.10-0.50 (depending on feature usage)
Common Issues & Solutions
API Key Not Valid
Error:Error 400: Invalid API key
Solutions:
- Verify key is correct from Google AI Studio
- Check key hasn’t expired or been revoked
- Ensure no extra spaces in secret value
- Try regenerating key in Google AI Studio
- Verify project has API enabled
Rate Limited
Error:Error 429: Rate limit exceeded
Solutions:
- For free tier: Add delays between API calls
- Reduce batch size for embeddings
- Upgrade to paid plan if consistent usage
- Distribute processing over time
Model Not Found
Error:model 'text-embedding-004' not found
Solutions:
- Check model name spelling exactly
- Verify Google has enabled this model in your region
- Try default model by omitting
modelsetting - Check project has sufficient quota
Advanced Configuration
Batch Processing
For bulk indexing, control batch size:Custom Prompts
LLM analysis uses templated prompts for:- Duplicate detection
- Quality assessment
- Issue routing
- Label suggestions
Integration Points
Gemini is used for:1. Embeddings (for all issues)
2. Similarity Search (optional, if configured)
3. Duplicate Detection (optional)
4. Quality Assessment (optional)
5. Auto Triage (optional)
6. Smart Routing (optional)
Monitoring API Usage
In Google AI Studio
- Go to Google AI Studio
- Click your API key
- View usage and quotas
Common Metrics
- Tokens processed
- Requests made
- Current month usage
- Rate limit status
Cost Optimization
Reduce API Calls
Use workflow presets:Batch Operations
Index multiple issues together:Archive Old Issues
Periodically clean up:- Close resolved issues
- Archive old discussions
- Reduces embedding storage costs in Qdrant
Testing
Verify Configuration
Test Dry-Run
Try without posting to GitHub:Monitor Logs
Check output for:- Successful embeddings
- API response times
- Error messages
- Rate limit warnings