Spaces:
Running
Running
File size: 4,935 Bytes
a63c61f daf250b a63c61f 599cc0d 87a832d 599cc0d c886471 599cc0d 583c3c6 e43cd24 daf250b e43cd24 daf250b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | # ==========================================
# RAG API Environment Configuration
# ==========================================
# --- API Settings ---
PROJECT_NAME="RAG API Service"
# --- Qdrant (Vector Database) ---
QDRANT_URL=https://41524d5c-8b82-4106-84b9-db452ef40133.eu-central-1-0.aws.cloud.qdrant.io:6333
QDRANT_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3MiOiJtIiwic3ViamVjdCI6ImFwaS1rZXk6NzY2MTRlMWUtNDJmMi00MDVkLTgxMWMtYjAyZDgwOGZjZDM0In0.QcECySpQnj1wzpif1k3K1G6Dz-PW9K5eNZ1ueNnn-IY
QDRANT_HOST=localhost
QDRANT_PORT=6333
QDRANT_COLLECTION=news_articles
# --- ClickHouse (Data Warehouse Analytics) ---
CLICKHOUSE_HOST=emrsjlb12r.eu-central-1.aws.clickhouse.cloud
CLICKHOUSE_PORT=8443
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=hOKAH9T9LoQ.m
CLICKHOUSE_SECURE=true
# --- PostgreSQL (Interactions & Accounts DB) ---
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_SERVER=localhost
POSTGRES_PORT=5433
POSTGRES_DB=rag_interactions
# --- Models configuration ---
EMBEDDING_MODEL=BAAI/bge-m3
VECTOR_SIZE=1024
RERANKER_MODEL=jinaai/jina-reranker-v3
# ==========================================
# LLM Provider β set LLM_PROVIDER to one of:
# groq β Free, 200+ tok/s, best for production (recommended)
# gemini β Free tier 15 RPM / 1M TPM, great quality
# together β Free $25 credit, Llama 3.3 70B
# openai β Paid, GPT-4o
# ollama β Local inference (no API key needed)
# ==========================================
LLM_PROVIDER=groq
# --- Groq (FREE) ---
# Get key: https://console.groq.com/keys
# Models: llama-3.3-70b-versatile | llama-3.1-8b-instant | mixtral-8x7b-32768 | gemma2-9b-it
GROQ_API_KEY=your-groq-api-key-here
GROQ_MODEL=llama-3.3-70b-versatile
# --- Google Gemini (FREE tier) ---
# Get key: https://aistudio.google.com/apikey
# Models: gemini-2.0-flash | gemini-1.5-flash | gemini-1.5-pro
GEMINI_API_KEY=AIzaSyB-LlAj_nhxRNpHzqBhxIMDc4R8eaDaYYI
GEMINI_MODEL=gemini-2.0-flash
# --- Together AI (FREE $25 credit) ---
# Get key: https://api.together.ai
# Models: meta-llama/Llama-3.3-70B-Instruct-Turbo | mistralai/Mixtral-8x7B-Instruct-v0.1
TOGETHER_API_KEY=key_CaW4uNxnNyzsFUcaYhB8y
TOGETHER_MODEL=meta-llama/Llama-3.3-70B-Instruct-Turbo
# --- OpenAI (Paid) ---
OPENAI_API_KEY=your-openai-api-key-here
# --- Ollama (Local) ---
# Run: ollama pull llama3.2
OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=llama3.2
# --- Redis Semantic Caching ---
REDIS_HOST=localhost
REDIS_PORT=6380
REDIS_DB=0
REDIS_PASSWORD=
# --- Security & Auth ---
SECRET_KEY=a_very_secret_key_change_me_in_production
ACCESS_TOKEN_EXPIRE_MINUTES=60
# --- Hybrid Search Settings ---
ENABLE_HYBRID_SEARCH=true
LIVE_SEARCH_TIMEOUT=4.0
LIVE_SEARCH_MAX_RESULTS=5
LIVE_SEARCH_WEIGHT=0.5
DB_SEARCH_WEIGHT=0.5
# --- Jina Reader Settings (Full Article Extraction) ---
# Extracts full article content from URLs (71x more content than snippets)
ENABLE_JINA_READER=true
JINA_READER_TIMEOUT=8.0
JINA_READER_MAX_CONCURRENT=5
# --- Kafka Settings (Top Stories β read-only consumer) ---
KAFKA_BOOTSTRAP_SERVERS=kafka-23e11337-weldamedhan2020-b406.i.aivencloud.com:20010
KAFKA_TOPIC_PROCESSED=news.processed
# SSL certs are read from /tmp/ β written at startup from env vars or cert files
# Set these to the content of your Aiven SSL certificates (newlines as \n)
# KAFKA_SSL_CA=<content of ca.pem>
# KAFKA_SSL_CERT=<content of service.cert>
# KAFKA_SSL_KEY=<content of service.key>
# Live Search Engine Configuration
LIVE_SEARCH_PRIMARY=searxng
LIVE_SEARCH_FALLBACK=duckduckgo
# SearXNG Settings (internal Docker network)
SEARXNG_ENABLED=true
SEARXNG_BASE_URL=http://searxng:8080
SEARXNG_TIMEOUT=5.0
SEARXNG_MAX_RESULTS=10
# --- OpenRouter (FREE model pool β fallback for intent classification) ---
# Get free key: https://openrouter.ai/keys (no credit card required)
# Free models: Llama 4, Qwen 3, DeepSeek, Gemma 3 and more
OPENROUTER_API_KEY=your-openrouter-api-key-here
# --- NewsAPI.org (Real-Time News Search) ---
# Get free key: https://newsapi.org/register (100 requests/day free)
# Paid tier: $449/month for production (250,000 requests/month)
NEWSAPI_KEY=74f434d6dafd4e0fb68b6f6c1252f8e0
NEWSAPI_ENABLED=true
NEWSAPI_TIMEOUT=2.0
NEWSAPI_MAX_RESULTS=20
# --- Jina AI Reader (Full Article Extraction) ---
# Get free key: https://jina.ai (1M tokens/month free)
# Without key: most news sites return 401 Unauthorized
JINA_API_KEY=jina_21658d5feda2467aad7b3bfc08a1b52a4KAI3aLzYhgeua81sPQSyyaYqoh_
JINA_RERANKER_ENABLED=true
JINA_RERANKER_MODEL=jina-reranker-v3
JINA_RERANKER_TIMEOUT=5.0
# --- ACLED Conflict Data (Structured conflict events for Ethiopia) ---
# Register at: https://acleddata.com/register
# Use your acleddata.com login credentials (email + password)
# No separate API key needed β OAuth token is generated automatically
ACLED_ENABLED=false
ACLED_EMAIL=your-acled-email@example.com
ACLED_PASSWORD=your-acled-password
ACLED_TIMEOUT=8.0
ACLED_MAX_RESULTS=20
|