OllamaGpuExecutor — IGpuExecutor + IGpuStatus over the ollama HTTP API.
First concretion of hive-system.protocols.gpu. Mirrors hive-system.secrets/* placement: protocol in hive-system.protocols.*, concrete adapter in a sibling sub-namespace.
Capabilities: :embed — POST /api/embed :generate — POST /api/generate (single-shot, no streaming for now)
What we deliberately don't do here:
ollama pull <model> already happened.Construct via (->ollama-executor opts) — never the raw record ctor.
OllamaGpuExecutor — IGpuExecutor + IGpuStatus over the ollama HTTP API.
First concretion of hive-system.protocols.gpu. Mirrors hive-system.secrets/*
placement: protocol in hive-system.protocols.*, concrete adapter in a
sibling sub-namespace.
Capabilities:
:embed — POST /api/embed
:generate — POST /api/generate (single-shot, no streaming for now)
What we deliberately don't do here:
- Pool / retry classification — that's the caller's job via
hive-weave.gpu/gpu-fork-join + hive-dsl rescue helpers.
- Streaming / SSE — generate returns once, no incremental delta.
- Model autoload — assumes `ollama pull <model>` already happened.
Construct via (->ollama-executor opts) — never the raw record ctor.(ollama-executor)(ollama-executor {:keys [host default-model default-timeout-ms
connect-timeout-ms executor-id]
:or {host "http://localhost:11434"
default-model "nomic-embed-text"
default-timeout-ms 120000
connect-timeout-ms 30000
executor-id :ollama}})Build an OllamaGpuExecutor.
Options: :host — base URL (default "http://localhost:11434") :default-model — model used when GpuRequest omits :gpu/model (default "nomic-embed-text") :default-timeout-ms — per-op HTTP timeout (default 120000) :connect-timeout-ms — TCP connect timeout (default 30000) :executor-id — keyword id (default :ollama)
Build an OllamaGpuExecutor.
Options:
:host — base URL (default "http://localhost:11434")
:default-model — model used when GpuRequest omits :gpu/model
(default "nomic-embed-text")
:default-timeout-ms — per-op HTTP timeout (default 120000)
:connect-timeout-ms — TCP connect timeout (default 30000)
:executor-id — keyword id (default :ollama)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |