embedContent

Embeds content given a GenAI model and a text string.

Return

a com.google.genai.types.EmbedContentResponse instance that contains the embedding.

Parameters

model

the name of the GenAI model to use for embedding

text

the text string to send to the embedding model


Embeds content given a GenAI model and a content object.

Return

a com.google.genai.types.EmbedContentResponse instance that contains the embedding.

Parameters

model

the name of the GenAI model to use for embedding

content

the com.google.genai.types.Content to send to the embedding model


Embeds content given a GenAI model and a list of text strings.

Return

a com.google.genai.types.EmbedContentResponse instance that contains the embedding.

Parameters

model

the name of the GenAI model to use for embedding

texts

the list of text strings to send to the embedding model