MCPcopy Create free account
hub / github.com/Louisym/MiniCC / to_dict

Method to_dict

tutorials/12_session_persistence.py:162–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 self.timestamp = time.time()
161
162 def to_dict(self) -> dict:
163 return {
164 "role": self.role,
165 "blocks": [b.to_dict() for b in self.blocks],
166 "uuid": self.uuid,
167 "parent_uuid": self.parent_uuid,
168 "timestamp": self.timestamp,
169 }
170
171 @staticmethod
172 def from_dict(data: dict) -> "ConversationMessage":

Callers

nothing calls this directly

Calls 1

to_dictMethod · 0.45

Tested by

no test coverage detected