ChatCompletion.fromMap constructor
Implementation
factory ChatCompletion.fromMap(Map<String, dynamic> json) {
return ChatCompletion(
id: json['id'],
object: json['object'],
created: json['created'],
model: json['model'],
usage: Usage.fromMap(
json['usage'],
),
choices: List<ChatChoice>.from(
json["choices"].map((x) => ChatChoice.fromMap(x)),
),
);
}