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

Method batch_delete

methods/mem0/client/main.py:886–903  ·  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

884
885 @api_error_handler
886 async def batch_delete(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]:
887 """Batch delete memories.
888
889 Args:
890 memories: List of memory dictionaries to delete. Each dictionary must contain:
891 - memory_id (str): ID of the memory to delete
892
893 Returns:
894 str: Message indicating the success of the batch deletion.
895
896 Raises:
897 APIError: If the API request fails.
898 """
899 response = await self.async_client.request("DELETE", "/v1/batch/", json={"memories": memories})
900 response.raise_for_status()
901
902 capture_client_event("async_client.batch_delete", self.sync_client)
903 return response.json()
904
905 @api_error_handler
906 async 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