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

Method from_dict

tutorials/12_session_persistence.py:172–179  ·  view source on GitHub ↗
(data: dict)

Source from the content-addressed store, hash-verified

170
171 @staticmethod
172 def from_dict(data: dict) -> "ConversationMessage":
173 return ConversationMessage(
174 role=data["role"],
175 blocks=[ContentBlock.from_dict(b) for b in data["blocks"]],
176 uuid=data.get("uuid", ""),
177 parent_uuid=data.get("parent_uuid", ""),
178 timestamp=data.get("timestamp", 0.0),
179 )
180
181 @staticmethod
182 def user_text(text: str) -> "ConversationMessage":

Callers

nothing calls this directly

Calls 3

ConversationMessageClass · 0.70
from_dictMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected