toMap method

Map<String, dynamic> toMap()

Converts this completion to map data.

Implementation

Map<String, dynamic> toMap() => {
      'id': id,
      'object': object,
      'created': created,
      'model': model,
      'choices': choices.map((e) => e.toMap()).toList(),
      'usage': usage.toMap(),
    };