From 93e872db6b7992cd4e582b38d605c0bd8de63258 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Thu, 1 May 2025 02:08:19 +0800 Subject: [PATCH 1/2] 123 --- src/plugins/heartFC_chat/heartFC_chat.py | 6 ++---- src/plugins/heartFC_chat/normal_chat_generator.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/heartFC_chat/heartFC_chat.py b/src/plugins/heartFC_chat/heartFC_chat.py index b9c50b40..73d679e4 100644 --- a/src/plugins/heartFC_chat/heartFC_chat.py +++ b/src/plugins/heartFC_chat/heartFC_chat.py @@ -446,7 +446,7 @@ class HeartFChatting: action_str = "回复表情" else: action_str = "不回复" - + logger.info(f"{self.log_prefix} 麦麦决定'{action_str}', 原因'{reasoning}'") return await self._handle_action( @@ -1001,9 +1001,7 @@ class HeartFChatting: } anchor_message = MessageRecv(placeholder_msg_dict) anchor_message.update_chat_stream(self.chat_stream) - logger.debug( - f"{self.log_prefix} 创建占位符锚点消息: ID={anchor_message.message_info.message_id}" - ) + logger.debug(f"{self.log_prefix} 创建占位符锚点消息: ID={anchor_message.message_info.message_id}") return anchor_message except Exception as e: diff --git a/src/plugins/heartFC_chat/normal_chat_generator.py b/src/plugins/heartFC_chat/normal_chat_generator.py index 6c7abc7d..ea698bf2 100644 --- a/src/plugins/heartFC_chat/normal_chat_generator.py +++ b/src/plugins/heartFC_chat/normal_chat_generator.py @@ -88,7 +88,7 @@ class NormalChatGenerator: content, reasoning_content, self.current_model_name = await model.generate_response(prompt) logger.debug(f"prompt:{prompt}\n生成回复:{content}") - + logger.info(f"对 {message.processed_plain_text} 的回复:{content}") info_catcher.catch_after_llm_generated( From 00544c9b623f299a1273e9ce5e60b8f506ade585 Mon Sep 17 00:00:00 2001 From: tcmofashi Date: Thu, 1 May 2025 02:20:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A7=81=E8=81=8A?= =?UTF-8?q?prompt=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/heartFC_chat/heartflow_prompt_builder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/heartFC_chat/heartflow_prompt_builder.py b/src/plugins/heartFC_chat/heartflow_prompt_builder.py index a0f266d6..429e9697 100644 --- a/src/plugins/heartFC_chat/heartflow_prompt_builder.py +++ b/src/plugins/heartFC_chat/heartflow_prompt_builder.py @@ -157,10 +157,13 @@ class PromptBuilder: current_mind_info, structured_info, chat_stream, + sender_name, ) return None - async def _build_prompt_focus(self, reason, current_mind_info, structured_info, chat_stream) -> tuple[str, str]: + async def _build_prompt_focus( + self, reason, current_mind_info, structured_info, chat_stream, sender_name + ) -> tuple[str, str]: individuality = Individuality.get_instance() prompt_personality = individuality.get_prompt(x_person=0, level=2) # 日程构建 @@ -240,6 +243,7 @@ class PromptBuilder: reason=reason, prompt_ger=prompt_ger, moderation_prompt=await global_prompt_manager.get_prompt_async("moderation_prompt"), + sender_name=sender_name, ) return prompt