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

Method from_dict

tutorials/13_multi_agent_coordination.py:148–155  ·  view source on GitHub ↗
(data: dict)

Source from the content-addressed store, hash-verified

146
147 @staticmethod
148 def from_dict(data: dict) -> "AgentMessage":
149 return AgentMessage(
150 from_agent=data["from"],
151 to_agent=data["to"],
152 msg_type=MessageType(data["type"]),
153 content=data["content"],
154 timestamp=data.get("timestamp", 0.0),
155 )
156
157
158# ============================================================

Callers 1

receiveMethod · 0.45

Calls 3

AgentMessageClass · 0.85
MessageTypeClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected