Liking cljdoc? Tell your friends :D

llm.sdk.providers.ollama.native

Native Ollama adapter — /api/chat (chat) and /api/embed (embeddings).

Ollama also exposes an OpenAI-compat /v1/chat/completions endpoint that the existing :ollama profile (registered) targets. This namespace registers a sibling :ollama-native profile for callers who want the native shape — older Ollama versions, vision input via the native :images field, or workflows that need the native :options keys (e.g. :num_ctx, :num_predict, :mirostat).

Streaming: Ollama uses NDJSON (one JSON object per line), NOT SSE. We re-use the http/sse-request line reader and parse each line as a raw JSON object instead of stripping a 'data: ' prefix.

Native Ollama adapter — /api/chat (chat) and /api/embed (embeddings).

Ollama also exposes an OpenAI-compat /v1/chat/completions endpoint
that the existing :ollama profile (registered) targets.
This namespace registers a sibling :ollama-native profile for callers
who want the native shape — older Ollama versions, vision input via
the native :images field, or workflows that need the native
:options keys (e.g. :num_ctx, :num_predict, :mirostat).

Streaming: Ollama uses NDJSON (one JSON object per line), NOT
SSE. We re-use the http/sse-request line reader and parse each line
as a raw JSON object instead of stripping a 'data: ' prefix.
raw docstring

build-embed-request-ollamaclj

(build-embed-request-ollama profile request)
source

build-request-ollamaclj

(build-request-ollama profile request)
source

make-embed-transportclj

(make-embed-transport)
source

make-transportclj

(make-transport)
source

parse-embed-error-ollamaclj

(parse-embed-error-ollama _profile status body)
source

parse-embed-response-ollamaclj

(parse-embed-response-ollama _profile raw)
source

parse-error-ollamaclj

(parse-error-ollama _profile status body)
source

parse-response-ollamaclj

(parse-response-ollama _profile raw)
source

parse-stream-event-ollamaclj

(parse-stream-event-ollama _profile line)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close