embed
Embeds the given text using the Google AI embeddings API.
Return
A list of floating-point values representing the embedding vector.
Parameters
text
The text to embed.
model
The model to use for embedding. Must have the LLMCapability.Embed capability.
Throws
if the model does not have the Embed capability.
Embeds the given inputs using the Google AI batch embeddings API.
Return
A list of embedding vectors, one per input string.
Parameters
inputs
The list of texts to embed.
model
The model to use for embedding. Must have the LLMCapability.Embed capability.
Throws
if the model does not have the Embed capability.