Generate Embeddings Using the Google Gemini API
gemini_embedding(
.input,
.model = "text-embedding-004",
.truncate = TRUE,
.timeout = 120,
.dry_run = FALSE,
.max_tries = 3
)
A matrix where each column corresponds to the embedding of a message in the message history.
A character vector of texts to embed or an LLMMessage
object
The embedding model identifier (default: "text-embedding-3-small").
Whether to truncate inputs to fit the model's context length (default: TRUE).
Timeout for the API request in seconds (default: 120).
If TRUE, perform a dry run and return the request object.
Maximum retry attempts for requests (default: 3).