refactor(chat): 优化异步任务处理和参数传递机制

- 重构ExpressionSelector初始化,添加chat_id参数支持
- 优化StreamLoopManager中异步任务的创建和管理方式
- 简化MessageManager中的消息添加流程
- 调整Prompt中表情选择器的参数传递结构
This commit is contained in:
Windpicker-owo
2025-10-03 02:32:02 +08:00
parent 67154ca78c
commit fa9f14388a
4 changed files with 11 additions and 10 deletions

View File

@@ -71,7 +71,8 @@ def weighted_sample(population: list[dict], weights: list[float], k: int) -> lis
class ExpressionSelector:
def __init__(self):
def __init__(self, chat_id: str = ""):
self.chat_id = chat_id
self.llm_model = LLMRequest(
model_set=model_config.model_task_config.utils_small, request_type="expression.selector"
)