in pkgs/google_generative_ai/lib/src/api.dart [626:634]
BatchEmbedContentsResponse parseBatchEmbedContentsResponse(Object jsonObject) {
return switch (jsonObject) {
{'embeddings': final List<Object?> embeddings} =>
BatchEmbedContentsResponse(
embeddings.map(_parseContentEmbedding).toList()),
{'error': final Object error} => throw parseError(error),
_ => throw unhandledFormat('EmbedContentResponse', jsonObject)
};
}