重构ChatStream和StreamContext:移除context_manager引用
- 在ChatStream及相关类中,将所有context_manager的实例替换为直接上下文访问。 - 更新方法,利用新的上下文结构来管理聊天状态和消息。 - 增强的StreamContext,增加了用于消息处理、统计和历史管理的方法。 - 在重构过程中改进了错误处理和日志记录。
This commit is contained in:
@@ -54,7 +54,7 @@ class TTSAction(BaseAction):
|
||||
|
||||
success, response_set, _ = await generate_reply(
|
||||
chat_stream=self.chat_stream,
|
||||
reply_message=self.chat_stream.context_manager.context.get_last_message(),
|
||||
reply_message=self.chat_stream.context.get_last_message(),
|
||||
enable_tool=global_config.tool.enable_tool,
|
||||
request_type="chat.tts",
|
||||
from_plugin=False,
|
||||
|
||||
Reference in New Issue
Block a user