Ollama embedder
Embeds through a local Ollama server using its /api/embed endpoint. Selected via EMBEDDING_PROVIDER=ollama.
Enable it
bash
EMBEDDING_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_EMBEDDING_MODEL=nomic-embed-text
EMBEDDING_DIMS=768Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to ollama. |
OLLAMA_BASE_URL | http://localhost:11434 | Base URL of the Ollama server; a trailing slash is trimmed. |
OLLAMA_EMBEDDING_MODEL | nomic-embed-text | Model pulled and served by Ollama. |
EMBEDDING_DIMS | 768 | Vector dimension; must match the embedding model. Passed through to the embedder. |
Notes
- Runs against a self hosted Ollama server, so there is no API key.
- Inputs are prefixed for asymmetric retrieval:
search_document:on add and update,search_query:on search. - Requests use httpx with a 30 second timeout and raise on non 200 responses.