CompletionResponse.fromMap constructor
Create the object from a Map<String, dynamic>
Implementation
factory CompletionResponse.fromMap(Map<String, dynamic> map) {
return CompletionResponse(
id: map['id'] as String,
object: map['object'] as String,
created: map['created'] as int,
model: map['model'] as String,
choices: List<Choices>.from(
(map['choices'] as List<dynamic>).map<Choices>(
(x) => Choices.fromMap(x as Map<String, dynamic>),
),
),
usage: Usage.fromMap(map['usage'] as Map<String, dynamic>),
);
}