ChatMessageContent.fromMap constructor
Implementation
factory ChatMessageContent.fromMap(Map<String, dynamic> map) =>
switch (map['type']) {
'text' => ChatMessageContentText.fromMap(map),
'image' => ChatMessageContentImage.fromMap(map),
'multi_modal' => ChatMessageContentMultiModal.fromMap(map),
null => throw ArgumentError('Type is required'),
_ => throw UnimplementedError('Unknown type: ${map['type']}'),
};