Ollama
Parameters for OllamaEmbedder, which embeds documents with models served by an Ollama instance.
Ollama Embedder embeds documents using locally hosted Ollama models. This embedder provides integration with Ollama's API for generating embeddings from various open-source models.
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
id | str | The model ID to use for embeddings | "openhermes" |
dimensions | int | Output dimensions of the embedding | 4096 |
host | Optional[str] | Host URL for Ollama server | None |
timeout | Optional[Any] | Request timeout | None |
options | Optional[Any] | Additional options for embedding generation | None |
client_kwargs | Optional[Dict[str, Any]] | Additional parameters for client initialization | None |
ollama_client | Optional[OllamaClient] | Pre-configured Ollama client | None |
async_client | Optional[AsyncOllamaClient] | Pre-configured async Ollama client | None |
enable_batch | bool | Has no effect. Batch embedding is unsupported and the flag is reset to False | False |
batch_size | int | Number of texts per batch. Unused by this embedder | 100 |