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