CMVR-AI-ANALYSIS/app/config.py

27 lines
816 B
Python
Raw Normal View History

2026-08-13 16:56:32 +08:00
from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
api_key: str = ""
profiles_dir: Path = Path("/data/profiles")
artifacts_dir: Path = Path("/data/artifacts")
jobs_dir: Path = Path("/data/jobs")
media_timeout_seconds: int = 120
sglang_fast_base_url: str = ""
sglang_accurate_base_url: str = ""
sglang_api_key: str = ""
sglang_timeout_seconds: int = 600
2026-08-13 16:56:32 +08:00
max_audio_bytes: int = 100 * 1024 * 1024
max_image_bytes: int = 30 * 1024 * 1024
2026-08-13 16:56:32 +08:00
max_video_bytes: int = 2 * 1024 * 1024 * 1024
video_sampling_frame_limit: int = 100
video_model_frame_limit: int = 30
max_video_context_tokens: int = 65536
2026-08-13 16:56:32 +08:00
settings = Settings()