Updates in client to support summary (#2951)
This commit is contained in:
@@ -472,6 +472,22 @@ class MemoryClient:
|
||||
capture_client_event("client.get_memory_export", self, {"keys": list(kwargs.keys()), "sync_type": "sync"})
|
||||
return response.json()
|
||||
|
||||
@api_error_handler
|
||||
def get_summary(self, filters: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
||||
"""Get the summary of a memory export.
|
||||
|
||||
Args:
|
||||
filters: Optional filters to apply to the summary request
|
||||
|
||||
Returns:
|
||||
Dict containing the export status and summary data
|
||||
"""
|
||||
|
||||
response = self.client.post("/v1/summary/", json=self._prepare_params({"filters": filters}))
|
||||
response.raise_for_status()
|
||||
capture_client_event("client.get_summary", self, {"sync_type": "sync"})
|
||||
return response.json()
|
||||
|
||||
@api_error_handler
|
||||
def get_project(self, fields: Optional[List[str]] = None) -> Dict[str, Any]:
|
||||
"""Get instructions or categories for the current project.
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "mem0ai"
|
||||
version = "0.1.107"
|
||||
version = "0.1.107r1"
|
||||
description = "Long-term memory for AI Agents"
|
||||
authors = [
|
||||
{ name = "Mem0", email = "founders@mem0.ai" }
|
||||
|
||||
Reference in New Issue
Block a user