refactor(chat): 简化记忆激活方法的参数
更新 `activate_memory_with_chat_history` 的调用方式,使用 `target_message` 对象来替代独立的 `target_user` 和 `chat_id` 参数。 此举将相关上下文封装到单个对象中,使得接口更加清晰,提高了代码的可维护性。
This commit is contained in:
@@ -583,9 +583,8 @@ class Prompt:
|
|||||||
# 激活长期记忆
|
# 激活长期记忆
|
||||||
memory_activator = MemoryActivator()
|
memory_activator = MemoryActivator()
|
||||||
running_memories = await memory_activator.activate_memory_with_chat_history(
|
running_memories = await memory_activator.activate_memory_with_chat_history(
|
||||||
chat_history=chat_history,
|
target_message=self.parameters.target,
|
||||||
target_user=self.parameters.sender,
|
chat_history_prompt=chat_history
|
||||||
chat_id=self.parameters.chat_id
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# 获取即时记忆
|
# 获取即时记忆
|
||||||
|
|||||||
Reference in New Issue
Block a user