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

Method set_context_id

methods/memos_agent.py:462–468  ·  view source on GitHub ↗

Set context ID for distinguishing personas. Args: context_id: Context identifier.

(self, context_id: int)

Source from the content-addressed store, hash-verified

460 context_id = self._get_context_id()
461 user_name = f"ctx_{context_id}"
462 self._tree_memory.delete_all(user_name=user_name)
463 except Exception as e:
464 logger.warning(f"Failed to clear Neo4j data: {e}")
465
466 self._tree_memory = None
467 self._mem_reader = None
468 self._stored_memory_count = 0
469
470 def set_context_id(self, context_id: int) -> None:
471 """Set context ID. Re-initializes memory system for new context."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected