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

Method update

methods/mem0/memory/main.py:634–650  ·  view source on GitHub ↗

Update a memory by ID. Args: memory_id (str): ID of the memory to update. data (dict): Data to update the memory with. Returns: dict: Updated memory.

(self, memory_id, data)

Source from the content-addressed store, hash-verified

632 return original_memories
633
634 def update(self, memory_id, data):
635 """
636 Update a memory by ID.
637
638 Args:
639 memory_id (str): ID of the memory to update.
640 data (dict): Data to update the memory with.
641
642 Returns:
643 dict: Updated memory.
644 """
645 capture_event("mem0.update", self, {"memory_id": memory_id})
646
647 existing_embeddings = {data: self.embedding_model.embed(data, "update")}
648
649 self._update_memory(memory_id, data, existing_embeddings)
650 return {"message": "Memory updated successfully!"}
651
652 def delete(self, memory_id):
653 """

Callers 15

chatMethod · 0.45
chatMethod · 0.45
chatMethod · 0.45
format_judgeMethod · 0.45
extract_option_lettersFunction · 0.45
computeMethod · 0.45
__init__Method · 0.45
_build_agent_paramsMethod · 0.45
get_infoMethod · 0.45
get_infoMethod · 0.45
get_infoMethod · 0.45
get_infoMethod · 0.45

Calls 3

_update_memoryMethod · 0.95
capture_eventFunction · 0.90
embedMethod · 0.65

Tested by 1

relational_db_migrationFunction · 0.36