researcher / TextGen /ConfigEnv.py
sccastillo's picture
update
476e500
"""Config class for handling env variables.
"""
from functools import lru_cache
from pydantic import BaseSettings
class Settings(BaseSettings):
OPENAI_API_KEY: str
class Config:
env_file = '.env'
@lru_cache()
def get_settings():
return Settings()
config = get_settings()