feat: 全面SSH中转代理 + mimo-v2.5-pro支持
- Yahoo Finance: 跳过本地限流,直接走SSH中转 - StockTwits: 直连403时自动fallback到SSH中转 - Reddit: 网络不可达时自动fallback到SSH中转 - Polymarket: 网络不可达时自动fallback到SSH中转 - FRED: 配置API Key (825283926dd016ea66e96cc919e047da) - .env: 新增FRED_API_KEY和OPENAI_COMPATIBLE_API_KEY - test_xiaomi.py: 小米mimo-v2.5-pro测试脚本
This commit is contained in:
1 parent
51d057e2c9
commit
f8a47cb473
6 files changed
+93
-49
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""使用小米 mimo-v2.5-pro 模型运行 TradingAgents 示例"""
|
||||
from tradingagents.graph.trading_graph import TradingAgentsGraph
|
||||
from tradingagents.default_config import DEFAULT_CONFIG
|
||||
|
||||
config = DEFAULT_CONFIG.copy()
|
||||
|
||||
# 使用 openai_compatible 对接小米 API
|
||||
config["llm_provider"] = "openai_compatible"
|
||||
config["backend_url"] = "https://token-plan-cn.xiaomimimo.com/v1"
|
||||
config["deep_think_llm"] = "mimo-v2.5-pro"
|
||||
config["quick_think_llm"] = "mimo-v2.5-pro"
|
||||
|
||||
# 设置 API Key(也可通过环境变量 OPENAI_COMPATIBLE_API_KEY)
|
||||
import os
|
||||
os.environ["OPENAI_COMPATIBLE_API_KEY"] = "tp-ce6eaqg1gh1uev46i4oexh4sahloyfo2hfpxuc2n9m7yl9dd"
|
||||
|
||||
# 减少辩论轮数加速测试
|
||||
config["max_debate_rounds"] = 1
|
||||
config["max_risk_discuss_rounds"] = 1
|
||||
|
||||
print("配置完成,开始运行 TradingAgents...")
|
||||
print(f"Provider: {config['llm_provider']}")
|
||||
print(f"Backend: {config['backend_url']}")
|
||||
print(f"Model: {config['deep_think_llm']}")
|
||||
|
||||
ta = TradingAgentsGraph(debug=True, config=config)
|
||||
|
||||
# 测试分析茅台(A股)
|
||||
_, decision = ta.propagate("600519.SS", "2026-01-15")
|
||||
print("\n=== 交易决策 ===")
|
||||
print(decision)
|
||||
Reference in new issue
Block a user