EmbedTextRequest.fromJson constructor

EmbedTextRequest.fromJson(
  1. Object? j
)

Implementation

factory EmbedTextRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return EmbedTextRequest(
    model: switch (json['model']) {
      null => '',
      Object $1 => decodeString($1),
    },
    text: switch (json['text']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}