From 52e363700a740101a51c413b886bbc8f4fa353b6 Mon Sep 17 00:00:00 2001 From: meng_xi_pan <1903647908@qq.com> Date: Wed, 2 Apr 2025 04:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=81=97=E7=95=99=E5=86=B2?= =?UTF-8?q?=E7=AA=81=EF=BC=8C=E5=A4=8D=E6=B4=BB=E5=BF=83=E6=B5=81=E5=85=B3?= =?UTF-8?q?=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat_module/think_flow_chat/think_flow_chat.py | 10 +++++----- .../think_flow_chat/think_flow_generator.py | 7 ++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/plugins/chat_module/think_flow_chat/think_flow_chat.py b/src/plugins/chat_module/think_flow_chat/think_flow_chat.py index 19247dc2c..3bd5d7181 100644 --- a/src/plugins/chat_module/think_flow_chat/think_flow_chat.py +++ b/src/plugins/chat_module/think_flow_chat/think_flow_chat.py @@ -276,11 +276,11 @@ class ThinkFlowChat: timer2 = time.time() timing_results["更新心流"] = timer2 - timer1 - # # 更新关系 - # timer1 = time.time() - # await self._update_relationship(message, response_set) - # timer2 = time.time() - # timing_results["更新关系"] = timer2 - timer1 + # 更新关系 + timer1 = time.time() + await self._update_relationship(message, response_set) + timer2 = time.time() + timing_results["更新关系"] = timer2 - timer1 # 输出性能计时结果 if do_reply: diff --git a/src/plugins/chat_module/think_flow_chat/think_flow_generator.py b/src/plugins/chat_module/think_flow_chat/think_flow_generator.py index 107acb3c2..d7240d9a6 100644 --- a/src/plugins/chat_module/think_flow_chat/think_flow_generator.py +++ b/src/plugins/chat_module/think_flow_chat/think_flow_generator.py @@ -42,7 +42,6 @@ class ResponseGenerator: current_model = self.model_normal model_response = await self._generate_response_with_model(message, current_model) - undivided_response = model_response # print(f"raw_content: {model_response}") @@ -50,10 +49,10 @@ class ResponseGenerator: logger.info(f"{global_config.BOT_NICKNAME}的回复是:{model_response}") model_response = await self._process_response(model_response) - return model_response, undivided_response + return model_response else: logger.info(f"{self.current_model_type}思考,失败") - return None, None + return None async def _generate_response_with_model(self, message: MessageThinking, model: LLM_request): sender_name = "" @@ -147,8 +146,6 @@ class ResponseGenerator: - 严格基于文字直接表达的对立关系判断 """ - logger.info(prompt) - # 调用模型生成结果 result, _, _ = await self.model_sum.generate_response(prompt) result = result.strip()