[Mem0] Add support for getting all users in python client (#1672)

This commit is contained in:
Deshraj Yadav
2024-08-09 00:27:54 -07:00
committed by GitHub
parent e570888437
commit d1c5c70b4c
3 changed files with 62 additions and 1 deletions

View File

@@ -237,6 +237,14 @@ class MemoryClient:
capture_client_event("client.history", self)
return response.json()
@api_error_handler
def users(self):
"""Get all users, agents, and sessions for which memories exist."""
response = self.client.get("/entities/")
response.raise_for_status()
capture_client_event("client.users", self)
return response.json()
def reset(self):
"""Reset the client. (Not implemented)