""" app/config.py ───────────── Central configuration — all env-driven settings live here. """ import os from dotenv import load_dotenv load_dotenv() class Config: # ── LLM ─────────────────────────────────────────────────────────────── GROQ_API_KEY: str = os.getenv("GROQ_API_KEY", "") LLM_MODEL: str = os.getenv("LLM_MODEL", "llama-3.3-70b-versatile") LLM_TEMPERATURE: float = float(os.getenv("LLM_TEMPERATURE", "0")) # ── External APIs ───────────────────────────────────────────────────── WEATHER_API_KEY: str = os.getenv("WEATHER_API_KEY", "") # ── Agent behaviour ─────────────────────────────────────────────────── MAX_RETRIES: int = int(os.getenv("MAX_RETRIES", "3")) EVAL_THRESHOLD: float = float(os.getenv("EVAL_THRESHOLD", "0.6")) HITL_ENABLED: bool = os.getenv("HITL_ENABLED", "true").lower() == "true" # ── UI mode ─────────────────────────────────────────────────────────── # Set to true when running under Gradio — switches HITL from input() # to the exception-based pause/resume mechanism GRADIO_MODE: bool = os.getenv("GRADIO_MODE", "false").lower() == "true" # ── RAG ─────────────────────────────────────────────────────────────── EMBEDDING_MODEL: str = "sentence-transformers/all-MiniLM-L6-v2" RAG_TOP_K: int = 2 # ── Guardrails ──────────────────────────────────────────────────────── BLOCKED_PHRASES: list = ["harm", "illegal", "violence", "hate"] settings = Config()