EmbedContentResponse.fromJson constructor

EmbedContentResponse.fromJson(
  1. Object? j
)

Implementation

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