feat(prompt): 添加动态群聊提醒并修复内存搜索

在系统提示中引入动态群聊提醒,使其具备上下文意识。现在仅在对话发生在群聊环境中时注入该提醒,从而防止在私聊中可能引起模型混淆。

这是通过向`PromptParameters`添加`group_chat_reminder_block`实现的,该模块会根据聊天类型有条件地填充。

此外,本次提交还包括修复在内存搜索过程中可能出现的`AttributeError`,确保在尝试使用内存模块之前先进行配置。
This commit is contained in:
tt-P607
2025-11-13 11:10:16 +08:00
parent b16b57b232
commit 5326c69163
3 changed files with 31 additions and 14 deletions

View File

@@ -63,7 +63,8 @@ class PromptParameters:
mood_prompt: str = ""
action_descriptions: str = ""
notice_block: str = ""
group_chat_reminder_block: str = ""
# 可用动作信息
available_actions: dict[str, Any] | None = None