Janus-backend / backend /.env.example
DevodG's picture
feat: stable janus intelligence with kaggle distillation
5f91e0b
# ========================================
# Janus - AI Intelligence System
# Environment Configuration Template
# ========================================
# Copy this file to .env and fill in your actual values.
# NEVER commit .env to version control.
# ---------- Application Version ----------
APP_VERSION=0.4.0
# ---------- Primary model routing ----------
# PRIMARY_PROVIDER: The main LLM provider (huggingface, openrouter, ollama, or openai)
# FALLBACK_PROVIDER: The backup provider if primary fails
PRIMARY_PROVIDER=huggingface
FALLBACK_PROVIDER=openrouter
# ---------- HuggingFace Inference API ----------
# Get your API key from: https://huggingface.co/settings/tokens
# Required permissions: "Make calls to Inference Providers"
HUGGINGFACE_API_KEY=hf_...
HUGGINGFACE_MODEL=Qwen/Qwen2.5-7B-Instruct
# ---------- Smart LLM Router ----------
# Priority: Gemini → Groq → OpenRouter → Cloudflare → Ollama
# Get keys from respective providers (all free tiers available)
GEMINI_API_KEY=AIza... # https://aistudio.google.com/apikey (1500 req/day free)
GROQ_API_KEY=gsk_... # https://console.groq.com/keys (fast, 14400 req/day free)
CLOUDFLARE_ACCOUNT_ID=... # https://dash.cloudflare.com (10k req/day free)
CLOUDFLARE_API_TOKEN=...
# ---------- OpenRouter ----------
# Get your API key from: https://openrouter.ai/keys
OPENROUTER_API_KEY=sk-or-v1-YOUR_KEY_HERE
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_CHAT_MODEL=openrouter/free
OPENROUTER_REASONER_MODEL=openrouter/free
OPENROUTER_SITE_URL=http://localhost:3000
OPENROUTER_APP_NAME=Janus
# ---------- Ollama ----------
# Install from: https://ollama.ai
OLLAMA_ENABLED=true
OLLAMA_BASE_URL=http://127.0.0.1:11434/api
OLLAMA_CHAT_MODEL=qwen2.5:3b-instruct
OLLAMA_REASONER_MODEL=qwen2.5:3b-instruct
# ---------- OpenAI ----------
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-proj-YOUR_KEY_HERE
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_CHAT_MODEL=gpt-4o-mini
OPENAI_REASONER_MODEL=gpt-4o
# ---------- External research APIs ----------
# Tavily: https://tavily.com (optional — crawler is primary)
TAVILY_API_KEY=tvly-dev-YOUR_KEY_HERE
# NewsAPI: https://newsapi.org
NEWSAPI_KEY=YOUR_KEY_HERE
# Alpha Vantage: https://www.alphavantage.co
ALPHAVANTAGE_API_KEY=YOUR_KEY_HERE
# Jina Reader: https://jina.ai
JINA_READER_BASE=https://r.jina.ai/http://
# ---------- Live Intelligence APIs ----------
# Google Safe Browsing: https://developers.google.com/safe-browsing
SAFE_BROWSING_API_KEY=
# VirusTotal: https://www.virustotal.com/gui/my-apikey
VIRUSTOTAL_API_KEY=
# urlscan.io: https://urlscan.io/user/api/
URLSCAN_API_KEY=
# AbuseIPDB: https://www.abuseipdb.com/account/api
ABUSEIPDB_API_KEY=
# ---------- Custom Crawler ----------
# Self-hosted web crawling — no API keys needed
CRAWLER_ENABLED=true
CRAWLER_TIMEOUT=30
# ---------- MiroFish ----------
# MiroFish is the simulation service (deprecated — using native engine)
MIROFISH_ENABLED=false
MIROFISH_API_BASE=http://127.0.0.1:5001
MIROFISH_TIMEOUT_SECONDS=120
MIROFISH_HEALTH_PATH=/health
MIROFISH_RUN_PATH=/simulation/run
MIROFISH_STATUS_PATH=/simulation/{id}
MIROFISH_REPORT_PATH=/simulation/{id}/report
MIROFISH_CHAT_PATH=/simulation/{id}/chat
# ---------- Routing ----------
SIMULATION_TRIGGER_KEYWORDS=simulate,predict,what if,reaction,scenario,public opinion,policy impact,market impact,digital twin
# ---------- Domain Packs ----------
FINANCE_DOMAIN_PACK_ENABLED=true
# ---------- Feature Flags (default: safe/minimal) ----------
# Control which subsystems start. Defaults minimize blast radius.
FEATURE_DAEMON=true
FEATURE_LEARNING=false
FEATURE_SENTINEL=false
FEATURE_SIMULATION=true
FEATURE_ADAPTIVE=false
FEATURE_SELF_TRAINING=false
FEATURE_EXPERIMENTAL=false
# ---------- Learning Layer ----------
LEARNING_ENABLED=false
KNOWLEDGE_MAX_SIZE_MB=200
LEARNING_SCHEDULE_INTERVAL=6
LEARNING_BATCH_SIZE=10
LEARNING_TOPICS=finance,markets,technology,policy
# ---------- Performance ----------
REQUEST_TIMEOUT_SECONDS=30
MAX_RESEARCH_SOURCES=5
CACHE_TTL_GENERIC_DAYS=30
CACHE_TTL_SPECIFIC_DAYS=7
# ---------- Cross-Modal Dissonance Engine ----------
# Temperature scaling for audio emotion softmax (higher = less confident predictions)
AUDIO_TEMPERATURE=1.5
# Fusion weights: w1·audio_text_div + w2·prosody_boost + w3·(1-text_confidence)
# Must be 3 comma-separated floats. Recommended to sum to 1.0.
DISSONANCE_WEIGHTS=0.5,0.3,0.2
# UPGRADE 1: Use audeering dimensional model (outputs VAD directly — no lookup table needed)
# Requires ~1.5GB download on first run.
USE_DIMENSIONAL_AUDIO_MODEL=false
# UPGRADE 2: Use emotion2vec (ACL 2024 SOTA). Requires: pip install funasr
USE_EMOTION2VEC=false