diff --git a/src/plugins/chat/message_sender.py b/src/plugins/chat/message_sender.py index a12f7320b..daba61552 100644 --- a/src/plugins/chat/message_sender.py +++ b/src/plugins/chat/message_sender.py @@ -67,6 +67,8 @@ class Message_Sender: try: end_point = global_config.api_urls.get(message.message_info.platform, None) if end_point: + # logger.info(f"发送消息到{end_point}") + # logger.info(message_json) await global_api.send_message(end_point, message_json) else: raise ValueError(f"未找到平台:{message.message_info.platform} 的url配置,请检查配置文件") 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 9ed08971d..7bf202b50 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 @@ -102,9 +102,13 @@ class ThinkFlowChat: """处理表情包""" if random() < global_config.emoji_chance: emoji_raw = await emoji_manager.get_emoji_for_text(response) + # print("11111111111111") + # logger.info(emoji_raw) if emoji_raw: emoji_path, description = emoji_raw emoji_cq = image_path_to_base64(emoji_path) + + # logger.info(emoji_cq) thinking_time_point = round(message.message_info.time, 2) @@ -123,6 +127,8 @@ class ThinkFlowChat: is_head=False, is_emoji=True, ) + + # logger.info("22222222222222") message_manager.add_message(bot_message) async def _update_using_response(self, message, response_set): diff --git a/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py b/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py index cca3f0049..3cd6096e7 100644 --- a/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py +++ b/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py @@ -118,6 +118,7 @@ class PromptBuilder: logger.info("开始构建prompt") prompt = f""" + {relation_prompt_all}\n {chat_target} {chat_talking_prompt} 你刚刚脑子里在想: diff --git a/src/plugins/moods/moods.py b/src/plugins/moods/moods.py index 39e13b937..98fd61952 100644 --- a/src/plugins/moods/moods.py +++ b/src/plugins/moods/moods.py @@ -229,9 +229,13 @@ class MoodManager: :param intensity: 情绪强度(0.0-1.0) """ if emotion not in self.emotion_map: + logger.debug(f"[情绪更新] 未知情绪词: {emotion}") return valence_change, arousal_change = self.emotion_map[emotion] + old_valence = self.current_mood.valence + old_arousal = self.current_mood.arousal + old_mood = self.current_mood.text valence_change *= relationship_manager.gain_coefficient[relationship_manager.positive_feedback_value] @@ -246,6 +250,8 @@ class MoodManager: # 限制范围 self.current_mood.valence = max(-1.0, min(1.0, self.current_mood.valence)) self.current_mood.arousal = max(0.0, min(1.0, self.current_mood.arousal)) - + self._update_mood_text() + logger.info(f"[情绪变化] {emotion}(强度:{intensity:.2f}) | 愉悦度:{old_valence:.2f}->{self.current_mood.valence:.2f}, 唤醒度:{old_arousal:.2f}->{self.current_mood.arousal:.2f} | 心情:{old_mood}->{self.current_mood.text}") +