File size: 447 Bytes
402ee6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()