""" Configuration management using Pydantic Settings """ from functools import lru_cache from typing import List from pydantic_settings import BaseSettings class Settings(BaseSettings): """Application settings""" # MongoDB MONGODB_URL: str = "mongodb://admin:password@localhost:27017" MONGODB_DATABASE: str = "datacenter_docs" # Redis REDIS_URL: str = "redis://localhost:6379/0" # MCP Server MCP_SERVER_URL: str = "http://localhost:8080" MCP_API_KEY: str = "default-key" # Anthropic Claude API ANTHROPIC_API_KEY: str = "sk-ant-default-key" # CORS CORS_ORIGINS: List[str] = ["*"] # Application LOG_LEVEL: str = "INFO" DEBUG: bool = False # API Configuration API_HOST: str = "0.0.0.0" API_PORT: int = 8000 WORKERS: int = 4 # LLM Configuration MAX_TOKENS: int = 4096 TEMPERATURE: float = 0.3 MODEL: str = "claude-sonnet-4-20250514" # Vector Store VECTOR_STORE_PATH: str = "./data/chroma_db" EMBEDDING_MODEL: str = "sentence-transformers/all-MiniLM-L6-v2" # Celery CELERY_BROKER_URL: str = "redis://localhost:6379/0" CELERY_RESULT_BACKEND: str = "redis://localhost:6379/0" class Config: env_file = ".env" case_sensitive = True @lru_cache() def get_settings() -> Settings: """Get cached settings instance""" return Settings()