EmbedTextResponse.fromJson constructor

EmbedTextResponse.fromJson(
  1. Object? j
)

Implementation

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