ChatCompletionResponse.fromJson constructor

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

Implementation

factory ChatCompletionResponse.fromJson(Map<String, dynamic> json) {
  return ChatCompletionResponse(
    choices:
        List<Choice>.from(json['choices'].map((x) => Choice.fromJson(x))),
  );
}