feat: add versioned backend scoring workflow

This commit is contained in:
2026-09-25 11:11:18 +08:00
parent 146d5566cf
commit eece55d08d
20 changed files with 2063 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
from functools import lru_cache
from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
database_url: str = "sqlite:///./wisegrade.db"
redis_url: str = "redis://localhost:6379/0"
inbox_path: Path = Path("/data/inbox")
processed_path: Path = Path("/data/processed")
exports_path: Path = Path("/data/exports")
deepseek_base_url: str = "https://api.deepseek.com"
deepseek_model: str = "deepseek-flash"
deepseek_api_key: str = ""
wisegrade_secret_key: str = ""
embedding_model_name: str = "BAAI/bge-m3"
embedding_model_path: Path = Path("/models/bge-m3")
embedding_model_version: str = "local"
model_timeout_seconds: int = 120
model_concurrency: int = 2
model_retries: int = 2
@lru_cache
def get_settings() -> Settings:
return Settings()