mirror of https://github.com/Mai-with-u/MaiBot.git
为已读加上已读标识
parent
8d23019d49
commit
19a172fad7
|
|
@ -408,6 +408,10 @@ class ActionPlanner:
|
|||
f"\n--- 以下是 {other_unread_count} 条你需要处理的新消息 ---\n{new_messages_str}\n------\n"
|
||||
)
|
||||
logger.debug(f"[私聊][{self.private_name}] 向 LLM 追加了 {other_unread_count} 条未读消息。")
|
||||
else:
|
||||
chat_history_text += (
|
||||
f"\n--- 以上均为已读消息,未读消息均已处理完毕 ---\n"
|
||||
)
|
||||
except AttributeError as e:
|
||||
logger.warning(f"[私聊][{self.private_name}] 构建聊天记录文本时属性错误: {e}")
|
||||
chat_history_text = "[获取聊天记录时出错]\n"
|
||||
|
|
|
|||
|
|
@ -98,7 +98,10 @@ class GoalAnalyzer:
|
|||
read_mark=0.0,
|
||||
)
|
||||
chat_history_text += f"\n--- 以下是 {observation_info.new_messages_count} 条新消息 ---\n{new_messages_str}"
|
||||
|
||||
else:
|
||||
chat_history_text += (
|
||||
f"\n--- 以上均为已读消息,未读消息均已处理完毕 ---\n"
|
||||
)
|
||||
# await observation_info.clear_unprocessed_messages()
|
||||
|
||||
persona_text = f"你的名字是{self.name},{self.personality_info}。"
|
||||
|
|
|
|||
|
|
@ -175,7 +175,10 @@ class ReplyGenerator:
|
|||
chat_history_text += f"\n--- 以下是 {observation_info.new_messages_count} 条新消息 ---\n{new_messages_str}"
|
||||
elif not chat_history_text:
|
||||
chat_history_text = "还没有聊天记录。"
|
||||
|
||||
else:
|
||||
chat_history_text += (
|
||||
f"\n--- 以上均为已读消息,未读消息均已处理完毕 ---\n"
|
||||
)
|
||||
# 构建 Persona 文本 (persona_text)
|
||||
persona_text = f"你的名字是{self.name},{self.personality_info}。"
|
||||
retrieval_context = chat_history_text # 使用前面构建好的 chat_history_text
|
||||
|
|
|
|||
Loading…
Reference in New Issue