feat(config): 新增最大并发分发数配置项
在 `ChatConfig` 中引入了 `max_concurrent_distributions` 配置,允许用户自定义最大并发处理的消息流数量。 此举旨在提供更灵活的性能调优选项,帮助用户根据服务器负载和API速率限制来控制资源消耗,防止系统过载。该配置的默认值为10。
This commit is contained in:
@@ -34,8 +34,8 @@ class StreamLoopManager:
|
||||
}
|
||||
|
||||
# 配置参数
|
||||
self.max_concurrent_streams = max_concurrent_streams or getattr(
|
||||
global_config.chat, "max_concurrent_distributions", 10
|
||||
self.max_concurrent_streams = (
|
||||
max_concurrent_streams or global_config.chat.max_concurrent_distributions
|
||||
)
|
||||
|
||||
# 强制分发策略
|
||||
|
||||
Reference in New Issue
Block a user