mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 11:19:50 +08:00
refactor: 将格式转换全局开关迁移到环境变量配置
- 新增 FORMAT_CONVERSION_ENABLED 环境变量(默认开启) - 移除数据库中的 format_conversion_enabled 系统配置 - 移除前端系统设置页面的格式转换开关 UI - 统一同族格式转换(OPENAI/OPENAI_CLI)逻辑,也需检查全局开关和端点配置 - 流生成器使用 ctx.needs_conversion 替代 _needs_format_conversion 方法调用 - 更新测试用例适配新逻辑 - 清理 .env.example 中过时的超时和连接池配置注释
This commit is contained in:
@@ -147,6 +147,13 @@ class Config:
|
||||
# HTTP_REQUEST_TIMEOUT: 非流式请求整体超时(秒),默认 300 秒
|
||||
self.http_request_timeout = float(os.getenv("HTTP_REQUEST_TIMEOUT", "300.0"))
|
||||
|
||||
# 格式转换配置
|
||||
# FORMAT_CONVERSION_ENABLED: 全局格式转换总开关,默认开启
|
||||
# 注意:即使开启,也需要端点配置 format_acceptance_config.enabled=true 才能生效
|
||||
self.format_conversion_enabled = os.getenv(
|
||||
"FORMAT_CONVERSION_ENABLED", "true"
|
||||
).lower() == "true"
|
||||
|
||||
# HTTP 连接池配置
|
||||
# HTTP_MAX_CONNECTIONS: 最大连接数,影响并发能力
|
||||
# - 每个连接占用一个 socket,过多会耗尽系统资源
|
||||
|
||||
Reference in New Issue
Block a user