MCPcopy Create free account
hub / github.com/modelscope/ms-agent / to_dict

Method to_dict

ms_agent/memory/default_memory.py:57–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 return self.value
56
57 def to_dict(self) -> Dict:
58 return {
59 'memory_id': self.memory_id,
60 'value': self.value,
61 'valid': self.valid,
62 'enable_idxs': self.enable_idxs.copy(
63 ), # Return a copy to prevent external modification
64 'disable_idx': self.disable_idx
65 }
66
67 @classmethod
68 def from_dict(cls, data: Dict) -> 'MemoryMapping':

Callers 1

save_cacheMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected