| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| from typing import Optional | |
| from pathlib import Path | |
| class Settings(BaseSettings): | |
| # Required | |
| LLM_PROVIDER: str | |
| MODEL_NAME: str | |
| # Optional | |
| OPENAI_API_KEY: Optional[str] = None | |
| HF_TOKEN: Optional[str] = None | |
| AMD_BASE_URL: Optional[str] = None | |
| # Pydantic v2 config | |
| model_config = SettingsConfigDict( | |
| env_file=str(Path(__file__).resolve().parent.parent.parent / ".env"), | |
| extra="ignore" | |
| ) | |
| settings = Settings() # type: ignore |