toJson method
Implementation
Map<String, dynamic> toJson() {
final result = <String, dynamic>{
'model': model,
'role': role,
'content': content.toJson(),
};
if (stopReason != null) {
result['stopReason'] = stopReason;
}
return result;
}