dco_decode_chat_message method

  1. @protected
ChatMessage dco_decode_chat_message(
  1. dynamic raw
)
override

Implementation

@protected ChatMessage dco_decode_chat_message(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
                if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
                return ChatMessage(role: dco_decode_role(arr[0]),
content: dco_decode_list_message_part(arr[1]),); }