Completion.fromMap constructor
Creates a Completion from decoded map data.
Implementation
factory Completion.fromMap(Map<String, dynamic> data) => Completion(
id: data['id'] as String,
object: data['object'] as String,
created: data['created'] as int,
model: data['model'] as String,
choices: (data['choices'] as List<dynamic>)
.map((e) => Choice.fromMap(e as Map<String, dynamic>))
.toList(),
usage: Usage.fromMap(data['usage'] as Map<String, dynamic>),
);