eroha-agentapi / core /config.py
Yermek68's picture
feat: add centralized config layer
402ee6c verified
raw
history blame contribute delete
447 Bytes
from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
APP_NAME: str = "Eroha AI Core"
DEBUG: bool = False
OPENAI_API_KEY: str = ""
MODEL_NAME: str = "gpt-4o-mini"
RATE_LIMIT: int = 20
TIMEOUT_SECONDS: int = 60
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
@lru_cache
def get_settings() -> Settings:
return Settings()