增加接口文档禁用
This commit is contained in:
@@ -4,19 +4,19 @@ from pydantic_settings import BaseSettings
|
||||
class Settings(BaseSettings):
|
||||
# 数据库配置
|
||||
database_url: str = ""
|
||||
|
||||
|
||||
# Redis配置
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
redis_lock_timeout: int = 30 # 锁超时时间(秒)
|
||||
redis_lock_retry_delay: float = 0.1 # 锁重试延迟(秒)
|
||||
redis_lock_max_retries: int = 100 # 最大重试次数
|
||||
|
||||
|
||||
# 业务配置
|
||||
count_threshold: int = 3 # count阈值,大于等于此值直接返回
|
||||
external_api_enabled: bool = False # 是否启用外部API调用
|
||||
external_api_retry_max: int = 3 # 外部API最大重试次数
|
||||
external_api_url: str = ""
|
||||
|
||||
|
||||
# 日志配置
|
||||
log_level: str = "INFO" # DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||||
log_file: str = "logs/app.log" # 日志文件路径
|
||||
@@ -24,15 +24,16 @@ class Settings(BaseSettings):
|
||||
log_backup_count: int = 5 # 备份文件数量
|
||||
log_format: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
log_date_format: str = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
|
||||
# 应用配置
|
||||
app_name: str = "AI Talk Callback API"
|
||||
environment: str = "production" # 环境: production, test, development
|
||||
debug: bool = False
|
||||
|
||||
disable_docs: bool = False
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
settings = Settings()
|
||||
settings = Settings()
|
||||
|
||||
Reference in New Issue
Block a user