Skip to content
1 min read · 151 words

Interface: OllamaEmbeddingsRequestBody ​

Defined in: src/batteries/embeddings/ollama/types.ts:67

The JSON request body POSTed to /api/embed.

Properties ​

PropertyTypeDescriptionDefined in
dimensions?numberOptional output dimensionality for models that support truncation.src/batteries/embeddings/ollama/types.ts:73
inputstring[]The batch of texts to embed. Always an array, even for a single input.src/batteries/embeddings/ollama/types.ts:71
keep_alive?string | numberHow long to keep the model loaded after the request.src/batteries/embeddings/ollama/types.ts:77
modelstringID of the embedding model to use.src/batteries/embeddings/ollama/types.ts:69
options?OllamaEmbeddingsRuntimeOptionsRuntime options for the embedding model.src/batteries/embeddings/ollama/types.ts:79
truncate?booleanWhether to truncate inputs that exceed the model's context window.src/batteries/embeddings/ollama/types.ts:75