Spaces:
Sleeping
Sleeping
File size: 480 Bytes
1441b40 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
class Settings:
GROQ_API_KEY: str = os.getenv("GROQ_API_KEY")
MODEL_ID: str = os.getenv("MODEL_ID")
def __init__(self):
if not self.GROQ_API_KEY:
raise ValueError("GROQ_API_KEY not found in environment variables")
if not self.MODEL_ID:
raise ValueError("MODEL_ID not found in environment variables")
settings = Settings() |