mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-05 17:22:28 +08:00
refactor: make stream smoothing parameters configurable and add models cache invalidation
- Move stream smoothing parameters (chunk_size, delay_ms) to database config - Remove hardcoded stream smoothing constants from StreamProcessor - Simplify dynamic delay calculation by using config values directly - Add invalidate_models_list_cache() function to clear /v1/models endpoint cache - Call cache invalidation on model create, update, delete, and bulk operations - Update admin UI to allow runtime configuration of smoothing parameters - Improve model listing freshness when models are modified
This commit is contained in:
@@ -83,6 +83,14 @@ class SystemConfigService:
|
||||
"value": False,
|
||||
"description": "是否启用流式平滑输出,自动根据文本长度调整输出速度",
|
||||
},
|
||||
"stream_smoothing_chunk_size": {
|
||||
"value": 20,
|
||||
"description": "流式平滑输出每个小块的字符数",
|
||||
},
|
||||
"stream_smoothing_delay_ms": {
|
||||
"value": 8,
|
||||
"description": "流式平滑输出每个小块之间的延迟毫秒数",
|
||||
},
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user