BatchEmbedTextRequest.fromJson constructor

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

Implementation

factory BatchEmbedTextRequest.fromJson(Map<String, dynamic> json) {
  return BatchEmbedTextRequest(
    model: json['model'] ?? '',
    texts: decodeList(json['texts']) ?? [],
    requests:
        decodeListMessage(json['requests'], EmbedTextRequest.fromJson) ?? [],
  );
}