Spaces:
Sleeping
Sleeping
| """Configuration management using Pydantic Settings""" | |
| from typing import Optional | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| """Application settings""" | |
| # Server Configuration | |
| HOST: str = "0.0.0.0" | |
| PORT: int = 7860 | |
| # Floor Manager Settings | |
| DEFAULT_FLOOR_DURATION: int = 300 # seconds | |
| MAX_AGENTS_PER_SESSION: int = 10 | |
| SESSION_TIMEOUT: int = 3600 # seconds | |
| AUTO_GRANT_FLOOR: bool = True | |
| # Protocol Settings | |
| OFP_VERSION: str = "1.0.0" | |
| MESSAGE_TIMEOUT: int = 30 # seconds | |
| # UI Settings | |
| UPDATE_INTERVAL: int = 2 # seconds | |
| MAX_MESSAGE_DISPLAY: int = 100 | |
| # Logging | |
| LOG_LEVEL: str = "INFO" | |
| model_config = SettingsConfigDict( | |
| env_file=".env", | |
| env_file_encoding="utf-8", | |
| case_sensitive=True | |
| ) | |
| # Global settings instance | |
| settings = Settings() | |