A tibble with two columns: input and embeddings.
The input column contains the texts sent to embed, and the embeddings column
is a list column where each row contains an embedding vector of the sent input.
Arguments
.input
A character vector of texts v, a list of texts and image objects, or an LLMMessage object
.provider
A function or function call specifying the language model provider and any additional parameters.
This should be a call to a provider function like openai(), ollama(), etc.
You can also set a default provider function via the tidyllm_embed_default option.
.model
The embedding model to use
.truncate
Whether to truncate inputs to fit the model's context length
.timeout
Timeout for the API request in seconds
.dry_run
If TRUE, perform a dry run and return the request object.
if (FALSE) {
c("What is the meaning of life, the universe and everything?",
"How much wood would a woodchuck chuck?",
"How does the brain work?") |>
embed(gemini)
}