caelum0x b5749ab837 fix: remove hardcoded secrets, add tests, fix PCA bug, pin deps
- Remove hardcoded FRED API key from autoresearch/prepare.py and
  thesis_portfolio_opt/research/experiment.py; load from .env via
  python-dotenv at module level instead
- Add .env.example at root and update MiroFish/.env.example with
  CORS_ORIGINS and FRED_API_KEY documentation
- Replace autoresearch/pyproject.toml: remove unused LLM deps
  (torch, rustbpe, tiktoken), add actual deps (scikit-learn,
  lightgbm, xgboost, fredapi, yfinance, cvxpy)
- Fix PCA backtest bug in autoresearch/train.py: propagate fitted
  PCA/scaler transform through model dict so run_oos_backtest
  replays the same transform on live rows (B10 no longer crashes)
- Fix MiroFish CORS wildcard: read allowed origins from CORS_ORIGINS
  env var, default to localhost dev origins
- Add MiroFish test suite (36 tests): config validation, file
  parser, text processor, task manager, API health/blueprints
- Pin upper bounds on thesis_portfolio_opt/requirements.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:16:45 +03:00

23 lines
973 B
Plaintext
Raw Permalink 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.

# LLM API配置(支持 OpenAI SDK 格式的任意 LLM API)
# 推荐使用阿里百炼平台qwen-plus模型:https://bailian.console.aliyun.com/
# 注意消耗较大,可先进行小于40轮的模拟尝试
LLM_API_KEY=your_api_key_here
LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
LLM_MODEL_NAME=qwen-plus
# ===== ZEP记忆图谱配置 =====
# 每月免费额度即可支撑简单使用:https://app.getzep.com/
ZEP_API_KEY=your_zep_api_key_here
# ===== 加速 LLM 配置(可选)=====
# 注意如果不使用加速配置,env文件中就不要出现下面的配置项
LLM_BOOST_API_KEY=your_api_key_here
LLM_BOOST_BASE_URL=your_base_url_here
LLM_BOOST_MODEL_NAME=your_model_name_here
# ===== CORS配置(可选)=====
# 逗号分隔的允许来源列表,默认: http://localhost:3000,http://localhost:5173
CORS_ORIGINS=http://localhost:3000,http://localhost:5173
# ===== 金融数据(可选)=====
FRED_API_KEY=your_fred_api_key_here