AiResponse.fromJson constructor

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

Implementation

factory AiResponse.fromJson(Map<String, dynamic> json) => AiResponse(
  choices: json["choices"] == null ? [] : List<Choice>.from(json["choices"]!.map((x) => Choice.fromJson(x))),
  usage: json["usage"] == null ? null : Usage.fromJson(json["usage"]),
);