GeminiAIHttpResponse.fromJson constructor
Implementation
factory GeminiAIHttpResponse.fromJson(Map<String, dynamic> json) {
List<GeminiAIResponseTransporter> responseCandidates = [];
for (var candidate in json['candidates']) {
responseCandidates.add(
GeminiAIResponseTransporter.fromJson(candidate),
);
}
return GeminiAIHttpResponse(
candidates: responseCandidates,
promptFeedback: json['promptFeedback'],
);
}