feat: 足球 LLM 预测服务初始提交
Profeto — 给 LLM 提供数据,让 LLM 预测足球比分。 核心模块: - FastAPI 后端 + PostgreSQL (SQLAlchemy async) - 多 Agent LLM 预测 (5 专家 + 终裁) - 数据采集 (bzzoiro / understat / injuries) - React 前端 (Vite + Tailwind) 包含: - 数据源抽象 (DataSource 协议 + 注册表) - Alembic 数据库迁移 - Prompt 模板 (单/多 Agent) - 核心路径单元测试
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
"""数据源配置常量(联赛映射)。"""
|
||||
from __future__ import annotations
|
||||
|
||||
# fdco 风格代码 → bzzoiro league_id
|
||||
BZZOIRO_LEAGUE_IDS: dict[str, int] = {
|
||||
"E0": 1, # Premier League
|
||||
"SP1": 3, # La Liga
|
||||
"D1": 5, # Bundesliga
|
||||
"I1": 4, # Serie A
|
||||
"F1": 6, # Ligue 1
|
||||
"CL": 7, # Champions League
|
||||
"EL": 8, # Europa League
|
||||
}
|
||||
|
||||
# fdco 代码 → understat 联赛代码
|
||||
FDCO_TO_UNDERSTAT: dict[str, str] = {
|
||||
"E0": "EPL",
|
||||
"SP1": "La_liga",
|
||||
"D1": "Bundesliga",
|
||||
"I1": "Serie_A",
|
||||
"F1": "Ligue_1",
|
||||
}
|
||||
|
||||
# fdco 代码 → 显示名
|
||||
LEAGUE_NAMES: dict[str, str] = {
|
||||
"E0": "Premier League",
|
||||
"SP1": "La Liga",
|
||||
"D1": "Bundesliga",
|
||||
"I1": "Serie A",
|
||||
"F1": "Ligue 1",
|
||||
"CL": "Champions League",
|
||||
"EL": "Europa League",
|
||||
}
|
||||
|
||||
# fdco 代码 → 国家
|
||||
LEAGUE_COUNTRIES: dict[str, str] = {
|
||||
"E0": "England",
|
||||
"SP1": "Spain",
|
||||
"D1": "Germany",
|
||||
"I1": "Italy",
|
||||
"F1": "France",
|
||||
"CL": "Europe",
|
||||
"EL": "Europe",
|
||||
}
|
||||
|
||||
REQUEST_INTERVAL = 1.2 # bzzoiro 限速(秒)
|
||||
Reference in New Issue
Block a user