MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / batch_delete

Method batch_delete

methods/mem0/client/main.py:406–423  ·  view source on GitHub ↗

Batch delete memories. Args: memories: List of memory dictionaries to delete. Each dictionary must contain: - memory_id (str): ID of the memory to delete Returns: str: Message indicating the success of the batch deletion. Raises:

(self, memories: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

404
405 @api_error_handler
406 def batch_delete(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]:
407 """Batch delete memories.
408
409 Args:
410 memories: List of memory dictionaries to delete. Each dictionary must contain:
411 - memory_id (str): ID of the memory to delete
412
413 Returns:
414 str: Message indicating the success of the batch deletion.
415
416 Raises:
417 APIError: If the API request fails.
418 """
419 response = self.client.request("DELETE", "/v1/batch/", json={"memories": memories})
420 response.raise_for_status()
421
422 capture_client_event("client.batch_delete", self)
423 return response.json()
424
425 @api_error_handler
426 def create_memory_export(self, schema: str, **kwargs) -> Dict[str, Any]:

Callers

nothing calls this directly

Calls 3

capture_client_eventFunction · 0.90
requestMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected