Replaces the unequal SLA (LLM 30s/2 retries vs FastGPT client 60s/3) that made the LangGraph backend look less stable under gray release. - core/fastgpt_client: FASTGPT_TIMEOUT_SECONDS / FASTGPT_MAX_RETRIES module constants (were inline literals in lifespan) - agent/llm: OpenAILLMService defaults 60.0s / 3 retries - core/config: named-profile fallback defaults 60/3 (prefixed and JSON-dict forms) - contract test test/backends/test_sla_alignment.py pins both sides to the same constants so the SLA cannot drift apart again - retry backoff intentionally differs (FastGPT fixed 1s vs LLM exponential) and is documented; aligned parameters are per-call timeout and max retry count Verified: 215 unit tests (3 new SLA contract tests)
38 lines
1.6 KiB
Bash
38 lines
1.6 KiB
Bash
DATABASE_URL=sqlite:///./test.db
|
||
SECRET_KEY=your_secret_key
|
||
DEBUG=True
|
||
|
||
ANALYSIS_SERVICE_URL=http://127.0.0.1:3030
|
||
ANALYSIS_AUTH_TOKEN=replace-with-fastgpt-api-key
|
||
APP_ID=replace-with-fastgpt-app-id
|
||
|
||
# Voice demo (Pipecat /ws-product). Relative to project root, or an absolute path.
|
||
VOICE_CONFIG=config/voice.json
|
||
|
||
# LangGraph chat backend(作业 2)
|
||
# AGENT_BACKEND=langgraph
|
||
#
|
||
# 命名 LLM 提供商组(均为 OpenAI 兼容接口):LLM_PROVIDERS 声明名单,
|
||
# LLM_PROVIDER 选择当前生效组;缺省或 fake = 离线脚本模型。
|
||
# 每组 LLM_<名>_BASE_URL / _API_KEY / _MODEL 必填;
|
||
# 可选 _TIMEOUT_SECONDS / _MAX_RETRIES / _TEMPERATURE / _EXTRA_BODY(JSON 字符串,
|
||
# 如思考开关 KIMI 网关为 {"reasoning_effort":"none"})。
|
||
# 超时/重试缺省 60 秒 / 3 次,与 FastGPT 客户端 SLA 对齐
|
||
# (契约测试 test/backends/test_sla_alignment.py)。
|
||
# LLM_PROVIDERS=deepseek,kimi,gpt6luna
|
||
# LLM_PROVIDER=deepseek
|
||
# LLM_DEEPSEEK_BASE_URL=https://api.openai.com/v1
|
||
# LLM_DEEPSEEK_API_KEY=replace-with-llm-api-key
|
||
# LLM_DEEPSEEK_MODEL=gpt-4o-mini
|
||
# LLM_DEEPSEEK_EXTRA_BODY={"reasoning_effort":"none"}
|
||
# LLM_KIMI_BASE_URL=http://127.0.0.1:3425/v1
|
||
# LLM_KIMI_API_KEY=magpie
|
||
# LLM_KIMI_MODEL=kimi-code-cn/kimi-for-coding
|
||
# LLM_KIMI_EXTRA_BODY={"reasoning_effort":"none"}
|
||
# LLM_GPT6LUNA_BASE_URL=http://127.0.0.1:3425/v1
|
||
# LLM_GPT6LUNA_API_KEY=magpie
|
||
# LLM_GPT6LUNA_MODEL=codex/gpt-6-luna
|
||
# LLM_GPT6LUNA_EXTRA_BODY={"reasoning_effort":"none"}
|
||
# 本地网关需直连(系统代理会导致 5xx);外部网关如需代理:
|
||
# LLM_HTTP_TRUST_ENV=true
|