diff --git a/mem0/client/main.py b/mem0/client/main.py index aa485da1..2775dc64 100644 --- a/mem0/client/main.py +++ b/mem0/client/main.py @@ -317,6 +317,28 @@ class MemoryClient: capture_client_event("client.reset", self) return {"message": "Client reset successful. All users and memories deleted."} + @api_error_handler + def batch_update(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]: + """Batch update memories.""" + response = self.client.put("/v1/batch/", json={"memories": memories}) + response.raise_for_status() + + capture_client_event("client.batch_update", self) + return response.json() + + @api_error_handler + def batch_delete(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]: + """Batch delete memories.""" + response = self.client.request( + "DELETE", + "/v1/batch/", + json={"memories": memories} + ) + response.raise_for_status() + + capture_client_event("client.batch_delete", self) + return response.json() + def chat(self): """Start a chat with the Mem0 AI. (Not implemented) diff --git a/pyproject.toml b/pyproject.toml index 93d2dd90..283bd0ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mem0ai" -version = "0.1.33" +version = "0.1.34" description = "Long-term memory for AI Agents" authors = ["Mem0 "] exclude = [