(data: dict)
| 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": |
nothing calls this directly
no test coverage detected