Add Comments

This commit is contained in:
马一丁
2025-11-13 11:37:13 +08:00
parent 4846b1f758
commit 3e4aa6366d
12 changed files with 72 additions and 3 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
"""
Configuration management module for the Report Engine.
Report Engine 配置模块,统一读取环境变量并提供类型安全的访问方式。
"""
import os
@@ -34,6 +34,7 @@ class Settings(BaseSettings):
CHART_STYLE: str = Field("modern", description="图表样式:modern/classic/")
class Config:
"""Pydantic配置:允许从.env读取并兼容大小写"""
env_file = ".env"
env_prefix = ""
case_sensitive = False
@@ -43,6 +44,7 @@ settings = Settings()
def print_config(config: Settings):
"""将当前配置项按人类可读格式输出到日志,方便排障"""
message = ""
message += "\n=== Report Engine 配置 ===\n"
message += f"LLM 模型: {config.REPORT_ENGINE_MODEL_NAME}\n"