hive: ollama-worker — WorkerBee that calls Ollama's HTTP API - #48
Open
adiled wants to merge 1 commit into
Open
Conversation
Sends prompts to Ollama's /api/chat endpoint and streams the response back over thrum. Run any local LLM Ollama supports. Also modifies serve.rs (nest-common) to pass through chi events directly instead of requiring claude's stream-json format, so workers that emit thrum events work natively. Ollama-worker registers as a worker bee with configurable models via OLLAMA_WORKER_MODEL / OLLAMA_WORKER_MODELS env vars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new hive that implements a WorkerBee for local LLMs via Ollama.
Sends prompts to Ollama's
/api/chatendpoint and streams the response back over thrum.Why
hum had no worker bee for local LLMs — only claude-cli (requires Anthropic CLI) existed as an inference worker. ollama-server and openai-server are API gateways (foragers), not workers. This fills the gap.
How
hives/ollama-worker/crate withWorkerBeetrait implserve.rs(nest-common) to pass through chi events without translation, so any worker can emit thrum events nativelysmollm:1.7b(the smallest Ollama model), configurable viaOLLAMA_WORKER_MODEL/OLLAMA_WORKER_MODELSTested
Returns valid OpenAI-compatible response with model output. Streaming also works.