ChatMessageModel.fromJson constructor

ChatMessageModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ChatMessageModel.fromJson(Map<String, dynamic> json) =>
    ChatMessageModel(
      id: json["id"],
      model: json["model"],
      choices: List<ChoiceModel>.from(
          json["choices"].map((x) => ChoiceModel.fromJson(x))),
    );