Files
qlib/config.yaml
T
Simon 01d818e12a docs: 使用说明 docs/USAGE.md;LLM URL/模型名配置移到 config.yaml(.env 仅 Key)
- config.yaml 新增 agent.llm:base_url / model 明文配置(默认百炼兼容端点 qwen-plus),api_key 只从 .env 的 LLM_API_KEY 读取;LLM_BASE_URL / LLM_MODEL 仍可经 .env 覆盖
- .env.example 注释同步;core.config 读取逻辑 env > yaml > 默认
- docs/USAGE.md:安装/配置/数据同步/启动/研究 API 与 Job/Experiment/Agent/测试门禁/已知限制/FAQ
- README 增加使用说明入口
- 新增 config LLM 测试 2 项(yaml 默认 + env 覆盖)→ pytest 81 passed / ruff clean
2026-09-06 17:57:15 +08:00

55 lines
1.7 KiB
YAML
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.
# ============================================================
# 全局可配置项(可提交,不含任何密钥)
# 约定(见 AGENT.md §2 / §33):
# - 可配置项统一写入本文件(项目根 config.yaml)
# - 密钥统一放根目录 .env(见 .env.example),
# 本文件通过 *_env 字段引用对应环境变量名,不写明文
# ============================================================
app:
name: "qlib-platform"
version: "0.1.0"
debug: false
# 从 .env 读取应用密钥的环境变量名
secret_key_env: "APP_SECRET_KEY"
api:
prefix: "/api"
database:
# 留空 → 默认 sqlite:///./data/quant.db(相对路径自动解析到项目根 data/)
url_env: "DATABASE_URL"
echo: false
# Alembic 迁移脚本目录(相对 backend/)
migrations_dir: "app/infrastructure/persistence/migrations"
data_source:
primary: "tushare"
fallback: "sina"
tushare_token_env: "TUSHARE_TOKEN"
storage:
# 相对项目根目录
raw_dir: "data/raw"
normalized_dir: "data/normalized"
parquet_dir: "data/parquet"
qlib_dir: "data/qlib"
job:
# 第一阶段异步任务模式:local(FastAPI BackgroundTasks 级);Phase 复杂后再引入队列
mode: "local"
agent:
llm:
# 大模型接入:URL 与模型名在此配置(明文、可提交);
# 密钥只放根目录 .env(LLM_API_KEY,见 .env.example)——本文件不写任何 Key。
# 可选:仍可通过 .env 的 LLM_BASE_URL / LLM_MODEL 覆盖下面两个值。
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
model: "qwen-plus"
base_url_env: "LLM_BASE_URL"
model_env: "LLM_MODEL"
api_key_env: "LLM_API_KEY"
logging:
level: "INFO"