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

Method batch_update

methods/mem0/client/main.py:865–883  ·  view source on GitHub ↗

Batch update memories. Args: memories: List of memory dictionaries to update. Each dictionary must contain: - memory_id (str): ID of the memory to update - text (str): New text content for the memory Returns: str: Message indi

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

Source from the content-addressed store, hash-verified

863
864 @api_error_handler
865 async def batch_update(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]:
866 """Batch update memories.
867
868 Args:
869 memories: List of memory dictionaries to update. Each dictionary must contain:
870 - memory_id (str): ID of the memory to update
871 - text (str): New text content for the memory
872
873 Returns:
874 str: Message indicating the success of the batch update.
875
876 Raises:
877 APIError: If the API request fails.
878 """
879 response = await self.async_client.put("/v1/batch/", json={"memories": memories})
880 response.raise_for_status()
881
882 capture_client_event("async_client.batch_update", self.sync_client)
883 return response.json()
884
885 @api_error_handler
886 async def batch_delete(self, memories: List[Dict[str, Any]]) -> Dict[str, Any]:

Callers

nothing calls this directly

Calls 3

capture_client_eventFunction · 0.90
putMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected