AIResponse.fromJson constructor
Implementation
AIResponse.fromJson(Map<String, dynamic> json) {
id = json['id'];
object = json['object'];
created = json['created'];
model = json['model'];
if (json['choices'] != null) {
choices = <Choices>[];
json['choices'].forEach((v) {
choices!.add(Choices.fromJson(v));
});
}
usage = json['usage'] != null ? Usage.fromJson(json['usage']) : null;
}