From 94a554699e0be0641ae918df71ca1e480a682339 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Fri, 28 Mar 2025 09:34:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?better=EF=BC=9A=E4=BC=98=E5=8C=96=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=92=8C=E5=BF=83=E6=B5=81=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/logger.py | 4 ++-- src/plugins/chat/prompt_builder.py | 2 +- src/plugins/memory_system/Hippocampus.py | 4 ++-- src/plugins/utils/statistic.py | 14 ++++++++++---- src/think_flow_demo/heartflow.py | 7 ++++--- src/think_flow_demo/sub_heartflow.py | 18 ++++++++++-------- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/common/logger.py b/src/common/logger.py index 8556c805..ef41f87a 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -81,7 +81,7 @@ MEMORY_STYLE_CONFIG = { "file_format": ("{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | 海马体 | {message}"), }, "simple": { - "console_format": ("{time:MM-DD HH:mm} | 海马体 | {message}"), + "console_format": ("{time:MM-DD HH:mm} | 海马体 | {message}"), "file_format": ("{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | 海马体 | {message}"), }, } @@ -240,7 +240,7 @@ SUB_HEARTFLOW_STYLE_CONFIG = { "file_format": ("{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | 麦麦小脑袋 | {message}"), }, "simple": { - "console_format": ("{time:MM-DD HH:mm} | 麦麦小脑袋 | {message}"), # noqa: E501 + "console_format": ("{time:MM-DD HH:mm} | 麦麦小脑袋 | {message}"), # noqa: E501 "file_format": ("{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | 麦麦小脑袋 | {message}"), }, } diff --git a/src/plugins/chat/prompt_builder.py b/src/plugins/chat/prompt_builder.py index c527df64..6b33e988 100644 --- a/src/plugins/chat/prompt_builder.py +++ b/src/plugins/chat/prompt_builder.py @@ -83,7 +83,7 @@ class PromptBuilder: text=message_txt, max_memory_num=3, max_memory_length=2, - max_depth=3, + max_depth=4, fast_retrieval=False ) memory_str = "" diff --git a/src/plugins/memory_system/Hippocampus.py b/src/plugins/memory_system/Hippocampus.py index 7cd8ff74..bdb2a50b 100644 --- a/src/plugins/memory_system/Hippocampus.py +++ b/src/plugins/memory_system/Hippocampus.py @@ -1046,14 +1046,14 @@ class Hippocampus: # 将选中的节点添加到remember_map for node, normalized_activation in sorted_nodes: remember_map[node] = activate_map[node] # 使用原始激活值 - logger.info( + logger.debug( f"节点 '{node}' (归一化激活值: {normalized_activation:.2f}, 激活值: {activate_map[node]:.2f})") else: logger.info("没有有效的激活值") # 从选中的节点中提取记忆 all_memories = [] - logger.info("开始从选中的节点中提取记忆:") + # logger.info("开始从选中的节点中提取记忆:") for node, activation in remember_map.items(): logger.debug(f"处理节点 '{node}' (激活值: {activation:.2f}):") node_data = self.memory_graph.G.nodes[node] diff --git a/src/plugins/utils/statistic.py b/src/plugins/utils/statistic.py index aad33e88..1071b29b 100644 --- a/src/plugins/utils/statistic.py +++ b/src/plugins/utils/statistic.py @@ -44,13 +44,19 @@ class LLMStatistics: def _record_online_time(self): """记录在线时间""" - try: + current_time = datetime.now() + # 检查5分钟内是否已有记录 + recent_record = db.online_time.find_one({ + "timestamp": { + "$gte": current_time - timedelta(minutes=5) + } + }) + + if not recent_record: db.online_time.insert_one({ - "timestamp": datetime.now(), + "timestamp": current_time, "duration": 5 # 5分钟 }) - except Exception: - logger.exception("记录在线时间失败") def _collect_statistics_for_period(self, start_time: datetime) -> Dict[str, Any]: """收集指定时间段的LLM请求统计数据 diff --git a/src/think_flow_demo/heartflow.py b/src/think_flow_demo/heartflow.py index 724ccfda..45bf3a85 100644 --- a/src/think_flow_demo/heartflow.py +++ b/src/think_flow_demo/heartflow.py @@ -35,6 +35,7 @@ class Heartflow: self._subheartflows = {} self.active_subheartflows_nums = 0 + self.personality_info = " ".join(global_config.PROMPT_PERSONALITY) async def heartflow_start_working(self): @@ -46,13 +47,13 @@ class Heartflow: logger.info("麦麦大脑袋转起来了") self.current_state.update_current_state_info() - personality_info = " ".join(global_config.PROMPT_PERSONALITY) + personality_info = self.personality_info current_thinking_info = self.current_mind mood_info = self.current_state.mood related_memory_info = 'memory' sub_flows_info = await self.get_all_subheartflows_minds() - schedule_info = bot_schedule.get_current_num_task(num = 5,time_info = True) + schedule_info = bot_schedule.get_current_num_task(num = 4,time_info = True) prompt = "" prompt += f"你刚刚在做的事情是:{schedule_info}\n" @@ -91,7 +92,7 @@ class Heartflow: return await self.minds_summary(sub_minds) async def minds_summary(self,minds_str): - personality_info = " ".join(BotConfig.PROMPT_PERSONALITY) + personality_info = self.personality_info mood_info = self.current_state.mood prompt = "" diff --git a/src/think_flow_demo/sub_heartflow.py b/src/think_flow_demo/sub_heartflow.py index b2179dc4..805218d5 100644 --- a/src/think_flow_demo/sub_heartflow.py +++ b/src/think_flow_demo/sub_heartflow.py @@ -75,7 +75,7 @@ class SubHeartflow: related_memory = await HippocampusManager.get_instance().get_memory_from_text( text=message_stream_info, - max_memory_num=3, + max_memory_num=2, max_memory_length=2, max_depth=3, fast_retrieval=False @@ -96,10 +96,12 @@ class SubHeartflow: prompt += f"你刚刚在做的事情是:{schedule_info}\n" # prompt += f"麦麦的总体想法是:{self.main_heartflow_info}\n\n" prompt += f"你{self.personality_info}\n" - prompt += f"现在你正在上网,和qq群里的网友们聊天,群里正在聊的话题是:{message_stream_info}\n" if related_memory_info: - prompt += f"你想起来{related_memory_info}。" - prompt += f"刚刚你的想法是{current_thinking_info}。" + prompt += f"你想起来你之前见过的回忆:{related_memory_info}。\n以上是你的回忆,不一定是目前聊天里的人说的,也不一定是现在发生的事情,请记住。\n" + prompt += f"刚刚你的想法是{current_thinking_info}。\n" + prompt += "-----------------------------------\n" + if message_stream_info: + prompt += f"现在你正在上网,和qq群里的网友们聊天,群里正在聊的话题是:{message_stream_info}\n" prompt += f"你现在{mood_info}。\n" prompt += "现在你接下去继续思考,产生新的想法,不要分点输出,输出连贯的内心独白,不要太长," prompt += "但是记得结合上述的消息,要记得维持住你的人设,关注聊天和新内容,不要思考太多:" @@ -108,7 +110,7 @@ class SubHeartflow: self.update_current_mind(reponse) self.current_mind = reponse - print(prompt) + logger.info(f"prompt:\n{prompt}\n") logger.info(f"麦麦的脑内状态:{self.current_mind}") async def do_after_reply(self,reply_content,chat_talking_prompt): @@ -117,7 +119,7 @@ class SubHeartflow: current_thinking_info = self.current_mind mood_info = self.current_state.mood - related_memory_info = 'memory' + # related_memory_info = 'memory' message_stream_info = self.outer_world.talking_summary message_new_info = chat_talking_prompt reply_info = reply_content @@ -129,8 +131,8 @@ class SubHeartflow: prompt += f"你{self.personality_info}\n" prompt += f"现在你正在上网,和qq群里的网友们聊天,群里正在聊的话题是:{message_stream_info}\n" - if related_memory_info: - prompt += f"你想起来{related_memory_info}。" + # if related_memory_info: + # prompt += f"你想起来{related_memory_info}。" prompt += f"刚刚你的想法是{current_thinking_info}。" prompt += f"你现在看到了网友们发的新消息:{message_new_info}\n" prompt += f"你刚刚回复了群友们:{reply_info}" From 256bfcf5c29249aeb91ffe8f66989a659a16949b Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Fri, 28 Mar 2025 10:59:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?secret:=E4=B8=BB=E5=8A=A8=E5=8F=91=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/__init__.py | 5 + src/plugins/chat/auto_speak.py | 172 +++++++++++++++++++++ src/plugins/chat/bot.py | 33 ++-- src/plugins/memory_system/Hippocampus.py | 2 +- src/plugins/schedule/offline_llm.py | 70 --------- src/plugins/schedule/schedule_generator.py | 2 +- src/plugins/utils/statistic.py | 2 +- src/think_flow_demo/sub_heartflow.py | 6 +- 8 files changed, 202 insertions(+), 90 deletions(-) create mode 100644 src/plugins/chat/auto_speak.py delete mode 100644 src/plugins/schedule/offline_llm.py diff --git a/src/plugins/chat/__init__.py b/src/plugins/chat/__init__.py index e598115a..0f03d58b 100644 --- a/src/plugins/chat/__init__.py +++ b/src/plugins/chat/__init__.py @@ -14,6 +14,7 @@ from .emoji_manager import emoji_manager from .relationship_manager import relationship_manager from ..willing.willing_manager import willing_manager from .chat_stream import chat_manager +from .auto_speak import auto_speak_manager # 导入自动发言管理器 # from ..memory_system.memory import hippocampus from src.plugins.memory_system.Hippocampus import HippocampusManager from .message_sender import message_manager, message_sender @@ -94,6 +95,10 @@ async def start_background_tasks(): logger.success("启动测试功能:心流系统") await start_think_flow() + # 启动自动发言检查任务 + # await auto_speak_manager.start_auto_speak_check() + # logger.success("自动发言检查任务启动成功") + # 只启动表情包管理任务 asyncio.create_task(emoji_manager.start_periodic_check()) diff --git a/src/plugins/chat/auto_speak.py b/src/plugins/chat/auto_speak.py new file mode 100644 index 00000000..38ca7d9f --- /dev/null +++ b/src/plugins/chat/auto_speak.py @@ -0,0 +1,172 @@ +import time +import asyncio +import random +from random import random as random_float +from typing import Dict +from ..config.config import global_config +from .message import MessageSending, MessageThinking, MessageSet, MessageRecv +from .message_base import UserInfo, Seg +from .message_sender import message_manager +from ..moods.moods import MoodManager +from .llm_generator import ResponseGenerator +from src.common.logger import get_module_logger +from src.think_flow_demo.heartflow import subheartflow_manager +from ...common.database import db +logger = get_module_logger("auto_speak") + +class AutoSpeakManager: + def __init__(self): + self._last_auto_speak_time: Dict[str, float] = {} # 记录每个聊天流上次自主发言的时间 + self.mood_manager = MoodManager.get_instance() + self.gpt = ResponseGenerator() # 添加gpt实例 + self._started = False + self._check_task = None + self.db = db + + async def get_chat_info(self, chat_id: str) -> dict: + """从数据库获取聊天流信息""" + chat_info = await self.db.chat_streams.find_one({"stream_id": chat_id}) + return chat_info + + async def start_auto_speak_check(self): + """启动自动发言检查任务""" + if not self._started: + self._check_task = asyncio.create_task(self._periodic_check()) + self._started = True + logger.success("自动发言检查任务已启动") + + async def _periodic_check(self): + """定期检查是否需要自主发言""" + while True and global_config.enable_think_flow: + + # 获取所有活跃的子心流 + active_subheartflows = [] + for chat_id, subheartflow in subheartflow_manager._subheartflows.items(): + if subheartflow.is_active and subheartflow.current_state.willing > 0: # 只考虑活跃且意愿值大于0.5的子心流 + active_subheartflows.append((chat_id, subheartflow)) + logger.debug(f"发现活跃子心流 - 聊天ID: {chat_id}, 意愿值: {subheartflow.current_state.willing:.2f}") + + if not active_subheartflows: + logger.debug("当前没有活跃的子心流") + await asyncio.sleep(20) # 添加异步等待 + continue + + # 随机选择一个活跃的子心流 + chat_id, subheartflow = random.choice(active_subheartflows) + logger.info(f"随机选择子心流 - 聊天ID: {chat_id}, 意愿值: {subheartflow.current_state.willing:.2f}") + + # 检查是否应该自主发言 + if await self.check_auto_speak(subheartflow): + logger.info(f"准备自主发言 - 聊天ID: {chat_id}") + # 生成自主发言 + bot_user_info = UserInfo( + user_id=global_config.BOT_QQ, + user_nickname=global_config.BOT_NICKNAME, + platform="qq", # 默认使用qq平台 + ) + + # 创建一个空的MessageRecv对象作为上下文 + message = MessageRecv({ + "message_info": { + "user_info": { + "user_id": chat_id, + "user_nickname": "", + "platform": "qq" + }, + "group_info": None, + "platform": "qq", + "time": time.time() + }, + "processed_plain_text": "", + "raw_message": "", + "is_emoji": False + }) + + await self.generate_auto_speak(subheartflow, message, bot_user_info, message.message_info["user_info"], message.message_info) + else: + logger.debug(f"不满足自主发言条件 - 聊天ID: {chat_id}") + + # 每分钟检查一次 + await asyncio.sleep(20) + + # await asyncio.sleep(5) # 发生错误时等待5秒再继续 + + async def check_auto_speak(self, subheartflow) -> bool: + """检查是否应该自主发言""" + if not subheartflow: + return False + + current_time = time.time() + chat_id = subheartflow.observe_chat_id + + # 获取上次自主发言时间 + if chat_id not in self._last_auto_speak_time: + self._last_auto_speak_time[chat_id] = 0 + last_speak_time = self._last_auto_speak_time.get(chat_id, 0) + + # 如果距离上次自主发言不到5分钟,不发言 + if current_time - last_speak_time < 30: + logger.debug(f"距离上次发言时间太短 - 聊天ID: {chat_id}, 剩余时间: {30 - (current_time - last_speak_time):.1f}秒") + return False + + # 获取当前意愿值 + current_willing = subheartflow.current_state.willing + + if current_willing > 0.1 and random_float() < 0.5: + self._last_auto_speak_time[chat_id] = current_time + logger.info(f"满足自主发言条件 - 聊天ID: {chat_id}, 意愿值: {current_willing:.2f}") + return True + + logger.debug(f"不满足自主发言条件 - 聊天ID: {chat_id}, 意愿值: {current_willing:.2f}") + return False + + async def generate_auto_speak(self, subheartflow, message, bot_user_info: UserInfo, userinfo, messageinfo): + """生成自主发言内容""" + thinking_time_point = round(time.time(), 2) + think_id = "mt" + str(thinking_time_point) + thinking_message = MessageThinking( + message_id=think_id, + chat_stream=None, # 不需要chat_stream + bot_user_info=bot_user_info, + reply=message, + thinking_start_time=thinking_time_point, + ) + + message_manager.add_message(thinking_message) + + # 生成自主发言内容 + response, raw_content = await self.gpt.generate_response(message) + + if response: + message_set = MessageSet(None, think_id) # 不需要chat_stream + mark_head = False + + for msg in response: + message_segment = Seg(type="text", data=msg) + bot_message = MessageSending( + message_id=think_id, + chat_stream=None, # 不需要chat_stream + bot_user_info=bot_user_info, + sender_info=userinfo, + message_segment=message_segment, + reply=message, + is_head=not mark_head, + is_emoji=False, + thinking_start_time=thinking_time_point, + ) + if not mark_head: + mark_head = True + message_set.add_message(bot_message) + + message_manager.add_message(message_set) + + # 更新情绪和关系 + stance, emotion = await self.gpt._get_emotion_tags(raw_content, message.processed_plain_text) + self.mood_manager.update_mood_from_emotion(emotion, global_config.mood_intensity_factor) + + return True + + return False + +# 创建全局AutoSpeakManager实例 +auto_speak_manager = AutoSpeakManager() \ No newline at end of file diff --git a/src/plugins/chat/bot.py b/src/plugins/chat/bot.py index ba8668af..ed387c06 100644 --- a/src/plugins/chat/bot.py +++ b/src/plugins/chat/bot.py @@ -129,23 +129,12 @@ class ChatBot: # 根据话题计算激活度 topic = "" - interested_rate = await HippocampusManager.get_instance().get_activate_from_text( - message.processed_plain_text,fast_retrieval=True) - # interested_rate = 0.1 - # logger.info(f"对{message.processed_plain_text}的激活度:{interested_rate}") - # logger.info(f"\033[1;32m[主题识别]\033[0m 使用{global_config.topic_extract}主题: {topic}") - await self.storage.store_message(message, chat, topic[0] if topic else None) + interested_rate = 0 + interested_rate = await HippocampusManager.get_instance().get_activate_from_text( + message.processed_plain_text,fast_retrieval=True) is_mentioned = is_mentioned_bot_in_message(message) - reply_probability = await willing_manager.change_reply_willing_received( - chat_stream=chat, - is_mentioned_bot=is_mentioned, - config=global_config, - is_emoji=message.is_emoji, - interested_rate=interested_rate, - sender_id=str(message.message_info.user_info.user_id), - ) if global_config.enable_think_flow: current_willing_old = willing_manager.get_willing(chat_stream=chat) @@ -154,6 +143,17 @@ class ChatBot: current_willing = (current_willing_old + current_willing_new) / 2 else: current_willing = willing_manager.get_willing(chat_stream=chat) + + willing_manager.set_willing(chat.stream_id,current_willing) + + reply_probability = await willing_manager.change_reply_willing_received( + chat_stream=chat, + is_mentioned_bot=is_mentioned, + config=global_config, + is_emoji=message.is_emoji, + interested_rate=interested_rate, + sender_id=str(message.message_info.user_info.user_id), + ) logger.info( f"[{current_time}][{chat.group_info.group_name if chat.group_info else '私聊'}]" @@ -347,8 +347,9 @@ class ChatBot: reply_message=None, platform="qq", ) - - await self.message_process(message_cq) + + if random() < 0.1: + await self.message_process(message_cq) elif isinstance(event, GroupRecallNoticeEvent) or isinstance(event, FriendRecallNoticeEvent): user_info = UserInfo( diff --git a/src/plugins/memory_system/Hippocampus.py b/src/plugins/memory_system/Hippocampus.py index bdb2a50b..6a59db58 100644 --- a/src/plugins/memory_system/Hippocampus.py +++ b/src/plugins/memory_system/Hippocampus.py @@ -1225,7 +1225,7 @@ class Hippocampus: total_nodes = len(self.memory_graph.G.nodes()) # activated_nodes = len(activate_map) activation_ratio = total_activation / total_nodes if total_nodes > 0 else 0 - activation_ratio = activation_ratio*40 + activation_ratio = activation_ratio*60 logger.info(f"总激活值: {total_activation:.2f}, 总节点数: {total_nodes}, 激活: {activation_ratio}") return activation_ratio diff --git a/src/plugins/schedule/offline_llm.py b/src/plugins/schedule/offline_llm.py deleted file mode 100644 index 5276f380..00000000 --- a/src/plugins/schedule/offline_llm.py +++ /dev/null @@ -1,70 +0,0 @@ -import asyncio -import os - -import aiohttp -from src.common.logger import get_module_logger - -logger = get_module_logger("offline_llm") - - -class LLMModel: - def __init__(self, model_name="deepseek-ai/DeepSeek-V3", **kwargs): - self.model_name = model_name - self.params = kwargs - self.api_key = os.getenv("SILICONFLOW_KEY") - self.base_url = os.getenv("SILICONFLOW_BASE_URL") - - if not self.api_key or not self.base_url: - raise ValueError("环境变量未正确加载:SILICONFLOW_KEY 或 SILICONFLOW_BASE_URL 未设置") - - logger.info(f"API URL: {self.base_url}") # 使用 logger 记录 base_url - - async def generate_response_async(self, prompt: str) -> str: - """异步方式根据输入的提示生成模型的响应""" - headers = {"Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json"} - - # 构建请求体 - data = { - "model": self.model_name, - "messages": [{"role": "user", "content": prompt}], - "temperature": 0.7, - **self.params, - } - - # 发送请求到完整的 chat/completions 端点 - api_url = f"{self.base_url.rstrip('/')}/chat/completions" - logger.info(f"Request URL: {api_url}") # 记录请求的 URL - - max_retries = 3 - base_wait_time = 15 - - async with aiohttp.ClientSession() as session: - for retry in range(max_retries): - try: - async with session.post(api_url, headers=headers, json=data) as response: - if response.status == 429: - wait_time = base_wait_time * (2**retry) # 指数退避 - logger.warning(f"遇到请求限制(429),等待{wait_time}秒后重试...") - await asyncio.sleep(wait_time) - continue - - response.raise_for_status() # 检查其他响应状态 - - result = await response.json() - if "choices" in result and len(result["choices"]) > 0: - content = result["choices"][0]["message"]["content"] - reasoning_content = result["choices"][0]["message"].get("reasoning_content", "") - return content, reasoning_content - return "没有返回结果", "" - - except Exception as e: - if retry < max_retries - 1: # 如果还有重试机会 - wait_time = base_wait_time * (2**retry) - logger.error(f"[回复]请求失败,等待{wait_time}秒后重试... 错误: {str(e)}") - await asyncio.sleep(wait_time) - else: - logger.error(f"请求失败: {str(e)}") - return f"请求失败: {str(e)}", "" - - logger.error("达到最大重试次数,请求仍然失败") - return "达到最大重试次数,请求仍然失败", "" diff --git a/src/plugins/schedule/schedule_generator.py b/src/plugins/schedule/schedule_generator.py index 3d466c88..c47f3d30 100644 --- a/src/plugins/schedule/schedule_generator.py +++ b/src/plugins/schedule/schedule_generator.py @@ -68,7 +68,7 @@ class ScheduleGenerator: self.print_schedule() while True: - print(self.get_current_num_task(1, True)) + # print(self.get_current_num_task(1, True)) current_time = datetime.datetime.now() diff --git a/src/plugins/utils/statistic.py b/src/plugins/utils/statistic.py index 1071b29b..b9efafd0 100644 --- a/src/plugins/utils/statistic.py +++ b/src/plugins/utils/statistic.py @@ -223,7 +223,7 @@ class LLMStatistics: logger.exception("统计数据处理失败") # 等待5分钟 - for _ in range(300): # 5分钟 = 300秒 + for _ in range(30): # 5分钟 = 300秒 if not self.running: break time.sleep(1) diff --git a/src/think_flow_demo/sub_heartflow.py b/src/think_flow_demo/sub_heartflow.py index 805218d5..d394a020 100644 --- a/src/think_flow_demo/sub_heartflow.py +++ b/src/think_flow_demo/sub_heartflow.py @@ -48,6 +48,8 @@ class SubHeartflow: self.current_mind = "你什么也没想" self.personality_info = " ".join(global_config.PROMPT_PERSONALITY) + + self.is_active = False def assign_observe(self,stream_id): self.outer_world = outer_world.get_world_by_stream_id(stream_id) @@ -58,8 +60,10 @@ class SubHeartflow: current_time = time.time() if current_time - self.last_reply_time > 180: # 3分钟 = 180秒 # print(f"{self.observe_chat_id}麦麦已经3分钟没有回复了,暂时停止思考") + self.is_active = False await asyncio.sleep(60) # 每30秒检查一次 else: + self.is_active = True await self.do_a_thinking() await self.judge_willing() await asyncio.sleep(60) @@ -88,7 +92,7 @@ class SubHeartflow: else: related_memory_info = '' - print(f"相关记忆:{related_memory_info}") + # print(f"相关记忆:{related_memory_info}") schedule_info = bot_schedule.get_current_num_task(num = 1,time_info = False)