# ====================================
# InsightReply 后端环境变量模板
# 复制此文件为 .env 并填入真实值
# cp .env.example .env
# ====================================

# ---- 数据库 ----
# DATABASE_URL=postgres://root:QG#7X*HHt3CqbZ@100.64.0.5:5432/InsightReply?sslmode=disable
DATABASE_URL=postgres://root:QG%237X%2AHHt3CqbZ@100.64.0.5:5432/InsightReply?sslmode=disable


# ---- LLM Configuration (Multi-Provider Support) ----
# Supported Providers: openai, anthropic, deepseek, gemini
LLM_PROVIDER=gemini
LLM_MODEL=gemini-2.5-flash

# Provider: OpenAI (or compatible: Groq, Ollama, vLLM)
OPENAI_API_KEY=sk-your-openai-api-key
OPENAI_BASE_URL=https://api.openai.com/v1     # 留空使用官方默认，可改写为代理地址
OPENAI_AVAILABLE_MODELS=gpt-4o,gpt-4o-mini,o1-mini # 前端下拉菜单展示的模型列表，逗号分隔

# Provider: Anthropic
ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key
ANTHROPIC_BASE_URL=
ANTHROPIC_AVAILABLE_MODELS=claude-3-5-sonnet-latest,claude-3-5-haiku-latest

# Provider: DeepSeek
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_AVAILABLE_MODELS=deepseek-chat,deepseek-reasoner

# Provider: Gemini
GEMINI_API_KEY=AIzaSy-your-gemini-api-key
GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/models
GEMINI_AVAILABLE_MODELS=gemini-2.5-flash,gemini-2.5-pro

# ---- JWT Authentication ----
JWT_SECRET=your-random-32-char-secret-key-here

# ---- 服务器 ----
SERVER_PORT=8009
LOG_LEVEL=info

# ---- CORS ----
CORS_ORIGINS=chrome-extension://*

# ---- LLM 韧性参数 ----
LLM_TIMEOUT_SEC=30
LLM_MAX_RETRIES=2
