mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 00:46:57 +08:00
fix agent memory
This commit is contained in:
@@ -51,8 +51,8 @@ class MoviePilotTool(BaseTool, metaclass=ABCMeta):
|
|||||||
|
|
||||||
# 记忆工具调用
|
# 记忆工具调用
|
||||||
await self._memory_manager.add_memory(
|
await self._memory_manager.add_memory(
|
||||||
session_id=self.session_id,
|
session_id=self._session_id,
|
||||||
user_id=self.user_id,
|
user_id=self._user_id,
|
||||||
role="tool_call",
|
role="tool_call",
|
||||||
metadata={
|
metadata={
|
||||||
"call_id": self.__class__.__name__,
|
"call_id": self.__class__.__name__,
|
||||||
@@ -83,8 +83,8 @@ class MoviePilotTool(BaseTool, metaclass=ABCMeta):
|
|||||||
else:
|
else:
|
||||||
formated_result = json.dumps(result, ensure_ascii=False, indent=2)
|
formated_result = json.dumps(result, ensure_ascii=False, indent=2)
|
||||||
await self._memory_manager.add_memory(
|
await self._memory_manager.add_memory(
|
||||||
session_id=self.session_id,
|
session_id=self._session_id,
|
||||||
user_id=self.user_id,
|
user_id=self._user_id,
|
||||||
role="tool_result",
|
role="tool_result",
|
||||||
content=formated_result
|
content=formated_result
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user