dco_decode_chat_response method

  1. @protected
ChatResponse dco_decode_chat_response(
  1. dynamic raw
)
override

Implementation

@protected ChatResponse dco_decode_chat_response(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
                if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}');
                return ChatResponse(model: dco_decode_opt_String(arr[0]),
message: dco_decode_chat_message(arr[1]),
text: dco_decode_String(arr[2]),
finishReason: dco_decode_opt_box_autoadd_finish_reason(arr[3]),
usage: dco_decode_opt_box_autoadd_usage(arr[4]),
rawJson: dco_decode_opt_String(arr[5]),); }