Team15 / src /hackathon /config.py
Gabriel Vidal-Ayrinhac
new containerized unity+api
7d6d833
raw
history blame contribute delete
779 Bytes
import os
from pathlib import Path
from dotenv import load_dotenv
# Charger les variables depuis le fichier .env
load_dotenv()
# Accéder aux variables d'environnement
class Settings:
def __init__(self):
self.MISTRAL_API_KEY: str = os.getenv("MISTRAL_API_KEY")
if not self.MISTRAL_API_KEY:
raise ValueError("MISTRAL_API_KEY is not set in the environment variables.")
self.ELEVENLABS_API_KEY: str = os.getenv("ELEVENLABS_API_KEY")
if not self.ELEVENLABS_API_KEY:
raise ValueError(
"ELEVENLABS_API_KEY is not set in the environment variables."
)
self.API_BASE_PATH = os.getenv(
"API_BASE_PATH", Path(__file__).resolve().parent.parent
)
settings = Settings()