batchEmbedContents method
Future<List<List<num> ?> ?>
batchEmbedContents(
- List<
String> texts, { - String? modelName,
- List<
SafetySetting> ? safetySettings, - GenerationConfig? generationConfig,
Embedding
is a technique used to represent information as a
list of floating point numbers in an array.
With Gemini, you can represent text (words, sentences, and blocks of text)
in a vectorized form, making it easier to compare and contrast embeddings.
For example, two texts that share a similar subject matter or sentiment
should have similar embeddings, which can be identified through mathematical
comparison techniques such as cosine similarity.
Use the embedding-001
model with either embedContent or batchEmbedContents
Implementation
@override
Future<List<List<num>?>?> batchEmbedContents(List<String> texts,
{String? modelName,
List<SafetySetting>? safetySettings,
GenerationConfig? generationConfig}) =>
_impl.batchEmbedContents(texts,
safetySettings: safetySettings,
generationConfig: generationConfig,
modelName: modelName);