video-query/backend/.env.example
2025-11-13 20:08:32 +05:30

47 lines
2 KiB
Text

# Google Gemini API Key (REQUIRED)
GOOGLE_API_KEY=your_api_key_here
# =============================================================================
# API TIER AND RATE LIMITING CONFIGURATION (IMPORTANT!)
# =============================================================================
# Set this based on your Gemini API subscription level
# This prevents 503 UNAVAILABLE errors by enforcing proper rate limits
# API Tier: "free" or "paid"
# - free: 5 requests per minute (RPM), 12 seconds between requests, max 2 parallel chunks
# - paid: 60 requests per minute (RPM), 1 second between requests, max 4-10 parallel chunks
# Default: free (conservative to prevent 503 overload errors)
GEMINI_API_TIER=free
# Parallel Processing Configuration
# Maximum number of video chunks to process simultaneously
# Recommended values:
# - Free tier: 1-2 (safe, prevents overload)
# - Paid tier: 4-10 (faster processing)
# Default: Auto-configured based on GEMINI_API_TIER (2 for free, 4 for paid)
# Uncomment to override:
# MAX_PARALLEL_CHUNKS=2
# =============================================================================
# MODEL CONFIGURATION (Optional)
# =============================================================================
# Specify which Gemini model to use for video processing and synthesis
# Default: gemini-2.5-pro for both (ensures consistency)
VIDEO_PROCESSOR_MODEL=gemini-2.5-pro
VIDEO_SYNTHESIS_MODEL=gemini-2.5-pro
# Batch Processing Logging (Optional)
# Enable detailed logging for batch processing operations
# Useful for debugging and understanding how videos are processed
# Default: false (to reduce log volume)
# Enable logging of prompts sent to AI for each video/chunk
# Shows exactly what prompt was used for each video in batch
BATCH_PROCESSING_LOG_PROMPTS=false
# Enable logging of summary previews (first 300 chars)
# Shows what summary each video/chunk generated
BATCH_PROCESSING_LOG_SUMMARIES=false
# Note: When both are enabled, logs will be at DEBUG level
# Use journalctl -u video-query -f | grep "Batch" to filter batch logs