Files
agent_jrxml/.env.example
T
panda 76f98a7aeb feat: add Anthropic API provider support and missing env vars
- Add LLM_PROVIDER env var (openai/anthropic) to switch cloud backend
- Use ChatAnthropic for anthropic provider with custom base_url
- Add CONTEXT_MAX_TOKENS, CONTEXT_KEEP_RECENT, SESSIONS_DIR,
  HISTORY_MAX_SNAPSHOTS to .env and .env.example
- Add langchain-anthropic dependency to requirements.txt

Note: E2E testing blocked — the configured MiniMax API key
(sk-cp-...) returns 401 across all endpoints (Anthropic and OpenAI).
The API key may be expired or lack text-generation model access.
2026-05-14 23:39:00 +08:00

42 lines
919 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 大语言模型后端:cloud 或 local
LLM_BACKEND=cloud
# 云端提供商:openai 或 anthropic
LLM_PROVIDER=openai
# 云端配置(OpenAI 兼容)
OPENAI_API_KEY=sk-xxxx
OPENAI_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4o
# 本地大语言模型(Ollama
LOCAL_LLM_MODEL=qwen2.5-coder:7b
# 嵌入模型后端:local 或 cloud
EMBED_BACKEND=local
LOCAL_EMBED_MODEL=Qwen/Qwen3-Embedding-0.6B
# 验证服务地址
VALIDATION_SERVICE_URL=http://localhost:8001/validate
# Chroma 持久化目录
CHROMA_PERSIST_DIR=./db/chroma
# 最大自动修正尝试次数
MAX_RETRY=3
# 上下文压缩阈值(token 数)
CONTEXT_MAX_TOKENS=6000
# 保留最近 N 轮完整对话
CONTEXT_KEEP_RECENT=4
# 会话持久化目录
SESSIONS_DIR=./sessions
# 状态快照保留数量(用于撤销操作)
HISTORY_MAX_SNAPSHOTS=10
# 意图识别模型(默认使用主 LLM 模型)
# INTENT_MODEL=gpt-4o-mini