"""
Configuration for FastAPI ML Service
"""

from pydantic_settings import BaseSettings
from typing import List


class Settings(BaseSettings):
    """Application settings loaded from environment variables"""

    # Server Configuration
    HOST: str = "0.0.0.0"
    PORT: int = 8001
    WORKERS: int = 1
    RELOAD: bool = False

    # Groq API Configuration
    GROQ_API_KEY: str = ""  # Must be set in .env
    GROQ_MODEL: str = "llama-3.2-3b-preview"  # Groq's LLaMA model
    MAX_TOKENS: int = 512
    TEMPERATURE: float = 0.7

    # Logging
    LOG_LEVEL: str = "INFO"

    # CORS
    ALLOWED_ORIGINS: List[str] = [
        "http://localhost:8000",
        "http://127.0.0.1:8000",
        "http://localhost:3000"
    ]

    class Config:
        env_file = ".env"
        case_sensitive = True


settings = Settings()

