ChatResponse.fromJson constructor

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

Implementation

factory ChatResponse.fromJson(Map<String, dynamic> json) => ChatResponse(
      choices: json['choices'] != null ? List<ChatResponseChoice>.from(
          json['choices'].map((x) => ChatResponseChoice.fromJson(x))): [],
    );