aaa / app /core /config.py
work-sejal
Deploy AI service with FastAPI
70ea7be
Raw
History Blame Contribute Delete
977 Bytes
"""Centralized configuration system using pydantic-settings.
All environment-driven settings are defined here. No module outside this file
should read os.environ directly.
"""
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
"""Application settings loaded from environment variables and .env file."""
ai_service_name: str = "LearningOutcomeOS-AI-V2"
ai_service_version: str = "2.0.0"
dataset_dir: str = "../learning_outcome_os_dataset_v2"
model_artifact_dir: str = "../artifacts/models"
metrics_dir: str = "../artifacts/metrics"
reports_dir: str = "../artifacts/reports"
log_level: str = "INFO"
seed: int = 20260520
low_confidence_threshold: float = 0.55
enable_explainability: bool = True
log_salt: str = "change-me-in-prod"
feedback_dir: str = "./artifacts/feedback"
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
settings = Settings()