feat: add Memory Gateway integration with async support for memory snapshots and user management
This commit is contained in:
@ -58,6 +58,17 @@ class MemoryService:
|
||||
store.load_from_disk()
|
||||
return capture_memory_snapshot(store)
|
||||
|
||||
async def capture_snapshot_for_run_async(
|
||||
self,
|
||||
*,
|
||||
user_id: str | None = None,
|
||||
session_id: str | None = None,
|
||||
query: str | None = None,
|
||||
) -> MemorySnapshot:
|
||||
"""Async-compatible snapshot hook used by optional memory integrations."""
|
||||
|
||||
return self.capture_snapshot_for_run()
|
||||
|
||||
def get_snapshot(self) -> MemorySnapshot:
|
||||
"""获取当前 run 应注入 system prompt 的 frozen snapshot。"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user