Images (PNG, JPEG, GIF, WebP) and WAV or OGG audio need a multimodal embedding model such
as "embeddinggemma-2:740m" and Ollama 0.40.4 or later. Ollama does not embed video or MP3.
ollama_embedding(
.input,
.model = "qwen3-embedding:0.6b",
.truncate = TRUE,
.ollama_server = "http://localhost:11434",
.timeout = 120,
.dry_run = FALSE,
.task = NULL,
.dimensions = NULL
)A tibble with columns input (text, or a label such as [IMG] cat.jpg) and
embeddings (list of numeric vectors).
A character vector of texts to embed, a list mixing texts with img() and
audio_file() objects, or an LLMMessage object. A nested list is one fused item with
at most one image and one audio file.
The embedding model identifier (default: "all-minilm").
Whether to truncate inputs to fit the model's context length (default: TRUE).
The URL of the Ollama server to be used (default: "http://localhost:11434").
Timeout for the API request in seconds (default: 120).
If TRUE, perform a dry run and return the request object.
NULL (default), "query" or "document". Adds the EmbeddingGemma 2 task
prefix to text; media get none.
Number of dimensions to return, for models that can shorten their vectors (default: the model's own size).