"""pydantic-settings 配置。""" from __future__ import annotations from pydantic import Field from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", extra="ignore") # --- app --- APP_ENV: str = "development" LOG_LEVEL: str = "INFO" # --- database --- DATABASE_URL: str = "postgresql+asyncpg://football:football@localhost:5432/football" # --- LLM (OpenAI-compatible) --- LLM_PROVIDER: str = "openai" LLM_API_KEY: str = "" LLM_BASE_URL: str = "https://api.openai.com/v1" LLM_MODEL: str = "gpt-4o" LLM_TIMEOUT: int = 60 # multi-agent 分档: 专家用便宜快模型,终裁用强模型;空则回落 LLM_MODEL LLM_SPECIALIST_MODEL: str = "" LLM_AGGREGATOR_MODEL: str = "" # --- data sources --- BZZOIRO_KEY: str = "" BZZOIRO_BASE: str = "https://sports.bzzoiro.com/api/v2" API_FOOTBALL_KEY: str = "" # --- CORS --- CORS_ORIGINS: str = "http://localhost:5173,http://localhost:3000" settings = Settings()