Skip to main content

batch_embeddings

Creates, updates, deletes, gets or lists a batch_embeddings resource.

Overview

Namebatch_embeddings
TypeResource
Idgemini.models.batch_embeddings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
embeddingsarrayOutput only. The embeddings for each request, in the same order as provided in the batch request.
usageMetadataobjectOutput only. The usage metadata for the request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_embed_contentsselectmodelsIdrequestsGenerates multiple embedding vectors from the input Content which consists of a batch of strings represented as EmbedContentRequest objects.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
modelsIdstring
requestsarrayRequired. Embed requests for the batch. The model in each of these requests must match the model specified BatchEmbedContentsRequest.model.

SELECT examples

Generates multiple embedding vectors from the input Content which consists of a batch of strings represented as EmbedContentRequest objects.

SELECT
embeddings,
usageMetadata
FROM gemini.models.batch_embeddings
WHERE modelsId = '{{ modelsId }}' -- required
AND requests = '{{ requests }}'
;