better:优化记忆提取功能
This commit is contained in:
@@ -96,7 +96,7 @@ class Heartflow:
|
||||
continue
|
||||
|
||||
await self.do_a_thinking()
|
||||
await asyncio.sleep(global_config.heart_flow_update_interval) # 5分钟思考一次
|
||||
await asyncio.sleep(global_config.heart_flow_update_interval * 3) # 5分钟思考一次
|
||||
|
||||
async def heartflow_start_working(self):
|
||||
# 启动清理任务
|
||||
@@ -110,7 +110,7 @@ class Heartflow:
|
||||
print("TODO")
|
||||
|
||||
async def do_a_thinking(self):
|
||||
logger.debug("麦麦大脑袋转起来了")
|
||||
# logger.debug("麦麦大脑袋转起来了")
|
||||
self.current_state.update_current_state_info()
|
||||
|
||||
# 开始构建prompt
|
||||
|
||||
@@ -139,7 +139,7 @@ class ChattingObservation(Observation):
|
||||
# traceback.print_exc() # 记录详细堆栈
|
||||
# print(f"处理后self.talking_message:{self.talking_message}")
|
||||
|
||||
self.talking_message_str = await build_readable_messages(self.talking_message)
|
||||
self.talking_message_str = await build_readable_messages(messages=self.talking_message, timestamp_mode="normal")
|
||||
|
||||
logger.trace(
|
||||
f"Chat {self.chat_id} - 压缩早期记忆:{self.mid_memory_info}\n现在聊天内容:{self.talking_message_str}"
|
||||
|
||||
Reference in New Issue
Block a user