# ============================================
# 中华药典 AI Agent 环境配置
# 复制为 .env 并填入实际值
# ============================================

# --- 应用 ---
APP_NAME=PharmacopoeiaAI
APP_ENV=development
APP_DEBUG=true
SECRET_KEY=change-me-to-a-random-secret-key
API_PREFIX=/api/v1

# --- 数据库 ---
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=pharmacopoeia
POSTGRES_USER=postgres
POSTGRES_PASSWORD=pharma2025
DATABASE_URL=postgresql+asyncpg://postgres:change-me@localhost:5432/pharmacopoeia

# --- Redis ---
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# --- 向量检索（pgvector） ---
PGVECTOR_TABLE=drug_chunks
EMBEDDING_DIM=1024

# --- LLM: Qwen API (阿里云百炼 DashScope) ---
QWEN_API_KEY=sk-your-qwen-api-key
QWEN_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
QWEN_MODEL=qwen-max
QWEN_MAX_TOKENS=4096
QWEN_TEMPERATURE=0.1

# --- LLM: Qwen VL 视觉模型（图片分析+OCR） ---
QWEN_VL_MODEL=qwen3.6-flash
ENABLE_WEB_SEARCH=true

# --- LLM: Qwen 本地部署 (后期切换，无需 API Key) ---
QWEN_LOCAL_BASE_URL=http://localhost:8000/v1
QWEN_LOCAL_MODEL=Qwen3-35B-A3B
LLM_PROVIDER=qwen

# --- Embedding ---
EMBEDDING_MODEL=BAAI/bge-m3
EMBEDDING_DIM=1024
EMBEDDING_DEVICE=cpu

# --- Reranker ---
RERANKER_MODEL=BAAI/bge-reranker-v2-m3

# --- 微信小程序 ---
WECHAT_APPID=your-wechat-appid
WECHAT_SECRET=your-wechat-secret

# --- 限流 ---
RATE_LIMIT_PER_MINUTE=60
RATE_LIMIT_PER_HOUR=1000

# --- 日志 ---
LOG_LEVEL=INFO
LOG_FILE=logs/app.log
