Skip to main content
Glama
settings.py1.83 kB
""" IRIS Configuration Settings Centralized configuration management using Pydantic settings. All settings are loaded from environment variables. """ from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): """Main application settings container""" model_config = SettingsConfigDict( env_file="/app/.env", env_file_encoding="utf-8", extra="ignore" ) # Database (PostgreSQL - for future use) database_url: str # Redis (Primary storage for conversations) redis_url: str redis_host: str = "localhost" redis_port: int = 6379 redis_db: int = 0 redis_password: Optional[str] = None redis_max_connections: int = 20 # Redis TTL Settings conversation_ttl: int = 86400 # 24 hours context_ttl: int = 3600 # 1 hour session_ttl: int = 7200 # 2 hours # Telegram telegram_bot_token: str telegram_webhook_url: Optional[str] = None # LLM openai_api_key: Optional[str] = None anthropic_api_key: Optional[str] = None llm_provider: str = "openai" # Web Search tavily_api_key: Optional[str] = None # Security (optional for now - will be required for production) jwt_secret_key: Optional[str] = None jwt_algorithm: str = "HS256" jwt_expiration_hours: int = 24 # Application debug: bool = False log_level: str = "INFO" environment: str = "development" # Document Storage document_storage_path: str = "./data/documents" document_retention_days: int = 90 @property def TELEGRAM_BOT_TOKEN(self) -> str: """Compatibility property for telegram bot token""" return self.telegram_bot_token # Global settings instance settings = Settings()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ilvolodel/iris-legacy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server