Skip to main content

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

  1. Go to Google AI Studio
  2. Sign in with your Google account
  3. Click Get API key
  4. Choose or create a Google Cloud project
  5. Copy the generated API key

2. Set up GitHub secret

Store your API key securely:
  1. Go to repository SettingsSecrets and variablesActions
  2. Create secret GEMINI_API_KEY
  3. Paste your API key

3. Configure Simili Bot

Add to simili.yaml:

Configuration reference

Embedding settings

LLM settings

Available models

v0.1.0 used text-embedding-004 (768 dimensions). If upgrading from v0.1.0, update your config to gemini-embedding-001 (3072 dimensions) and re-index your Qdrant collection.

Pricing

Google Gemini offers a free tier: Free Tier:
  • Embeddings: 50 requests per minute
  • LLM: 15 requests per minute
  • Generous monthly quotas
Paid (if needed):
  • Pay-as-you-go pricing
  • No monthly minimum
  • Bulk discounts available
Estimate for 1000 issues:
  • 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:
  1. Verify key is correct from Google AI Studio
  2. Check key hasn’t expired or been revoked
  3. Ensure no extra spaces in secret value
  4. Try regenerating key in Google AI Studio
  5. Verify project has API enabled

Rate limited

Error: Error 429: Rate limit exceeded Solutions:
  1. For free tier: Add delays between API calls
  2. Reduce batch size for embeddings
  3. Upgrade to paid plan if consistent usage
  4. Distribute processing over time

Model not found

Error: model 'gemini-embedding-001' not found Solutions:
  1. Check model name spelling exactly
  2. Verify Google has enabled this model in your region
  3. Try default model by omitting model setting
  4. Check project has sufficient quota

Advanced configuration

Batch processing

For bulk indexing, control batch size:
Smaller batches help with rate limiting but increase request count.

Custom prompts

LLM analysis uses templated prompts for:
  • Duplicate detection
  • Quality assessment
  • Issue routing
  • Label suggestions
These are built-in and optimized for Gemini.

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

  1. Go to Google AI Studio
  2. Click your API key
  3. View usage and quotas

Common metrics

  • Tokens processed
  • Requests made
  • Current month usage
  • Rate limit status

Cost optimization

Reduce API calls

Use workflow presets:
Disable features you don’t need:

Batch operations

Index multiple issues together:
Batching reduces per-issue overhead.

Archive old issues

Periodically clean up:
  1. Close resolved issues
  2. Archive old discussions
  3. Reduces embedding storage costs in Qdrant

Testing

Verify configuration

Should output analysis without errors.

Test dry-run

Try without posting to GitHub:

Monitor logs

Check output for:
  • Successful embeddings
  • API response times
  • Error messages
  • Rate limit warnings

Next steps

Qdrant setup

Configure vector database

Configuration overview

View all configuration options

Semantic search guide

Learn how semantic search works