dco_decode_chat_chunk method

  1. @protected
ChatChunk dco_decode_chat_chunk(
  1. dynamic raw
)
override

Implementation

@protected ChatChunk dco_decode_chat_chunk(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
                if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
                return ChatChunk(delta: dco_decode_String(arr[0]),
done: dco_decode_bool(arr[1]),
finishReason: dco_decode_opt_box_autoadd_finish_reason(arr[2]),
rawJson: dco_decode_opt_String(arr[3]),); }