Map<String, dynamic> toJson() => { "sourceDocuments": List<dynamic>.from(sourceDocuments.map((x) => x.toJson())), "text": text, };