toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'content': content.map((c) => c.toJson()).toList(),
if (structuredContent != null) 'structuredContent': structuredContent,
// ignore: deprecated_member_use_from_same_package
'isStreaming': isStreaming,
if (isError != null) 'isError': isError,
};
}