Skip to content

ollama://

Ollama — local LLM runner. Talks to a local Ollama daemon (default http://localhost:11434) over its native chat and embeddings API. Use this when you want to run open-weights models (Llama 3, Mistral, Qwen, Phi-3, etc.) on your own machine or in your cluster without leaving the network. No API key required — auth is purely network-level.

URI shape

ollama://chat?model=<name>&baseURL=<url>&temperature=<float>
ollama://embeddings?model=<name>&baseURL=<url>

Parameters

Param Type Default Producer/Consumer/Both Description
path enum required Producer chat or embeddings.
model string llama3 Producer Ollama model tag (must be pulled on the daemon first via ollama pull). Common: llama3, mistral, qwen2:7b, nomic-embed-text (embeddings).
baseURL string http://localhost:11434 Producer Ollama daemon URL. Override to talk to a remote daemon or sidecar.
temperature float 0.7 Producer Sampling temperature, passed inside the options object.

No apiKey parameter — Ollama doesn't authenticate. No maxTokens parameter — Ollama uses model-default max output unless the model itself caps it.

Producer-only.

Headers

Reads:

Header Effect
systemPrompt Prepended as a role: system message.

Sets:

Header Description
ollama.model Model id from the response.
ollama.done Boolean — generation completed.
ollama.metrics.promptEvalCount Tokens evaluated for the prompt.
ollama.metrics.evalCount Tokens generated.

Examples

Basic local chat:

- id: local-chat
  from: direct://chat
  steps:
    - to: ollama://chat?model=llama3

Remote daemon with explicit URL:

- to: ollama://chat?model=qwen2:7b&baseURL=http://gpu-host:11434&temperature=0.2

Embeddings for a RAG pipeline:

- id: embed
  from: direct://embed
  steps:
    - to: ollama://embeddings?model=nomic-embed-text

Behavior notes

  • 300s timeout — longer than other providers because local models on CPU can take a long time to load and respond on first call.
  • Streaming disabled. The component sets stream: false for simplicity; the daemon returns one JSON blob. The first request after a daemon start typically pays a model-load tax of several seconds.
  • Model must be pulled. If the daemon doesn't have the model cached, the call fails with model 'X' not found, try pulling it first — ollama pull <model> on the daemon host fixes it.
  • Chat path: POST {baseURL}/api/chat. Embeddings path: POST {baseURL}/api/embeddings (singular prompt, not the OpenAI plural input).
  • Embedding response shape is {embedding: [...]} — Helix writes the float slice directly to the exchange body.

Multimodal input (vision models)

ollama://chat works with any Ollama vision model (llava, llama3.2-vision, granite3.2-vision, qwen2-vl, etc.). Images travel in Ollama's native images: []string (base64) field alongside the text in content.

Body Headers What gets sent
string or []byte (non-image) — Text-only message, no images field.
[]byte w/ image magic HelixLLMSystemPrompt for the prompt images: ["<base64>"] + text from the system prompt.
Any text body HelixLLMImages = []string of URLs URLs get inlined as [image URL: …] text — Ollama's chat endpoint does not fetch URLs server-side. Use the file:// step to download first, then pass bytes.
*exchange.MultipartContent — Pass-through.
- to: ollama://chat?model=granite3.2-vision&baseURL=http://localhost:11434
  # body: PNG/JPEG bytes from upstream

Source

  • pkg/component/ollama/ollama.go
  • pkg/component/ollama/ollama_test.go

See also

  • vllm — an alternative self-hosted runner that exposes an OpenAI-compatible API.
  • openai — hosted equivalent.
  • providers guide.