@namzu/ollama
v2.2.1
Published
Ollama LLM provider for @namzu/sdk. Local-first LLM support — run Llama, Mistral, Phi, and 100+ open models on your own hardware.
Readme
The Ollama model driver for Namzu.
Install · Usage · Documentation
Implements the kernel's LLMProvider interface over a local Ollama server,
so a run can be driven by a model on your own machine with no key and no
egress. Installed only if you use it — the kernel has no preferred vendor
and no driver is a dependency of it.
Install
pnpm add @namzu/sdk @namzu/ollama@namzu/sdk is a peer dependency. Install both.
Usage
import { ProviderRegistry } from '@namzu/sdk'
import { registerOllama } from '@namzu/ollama'
// Once, at startup.
registerOllama()
const { provider } = ProviderRegistry.create({
type: 'ollama',
model: 'llama3.2', // default; overridable per call
})
for await (const chunk of provider.chatStream({
model: 'llama3.2',
messages: [{ role: 'user', content: 'Hello' }],
})) {
if (chunk.delta.content) process.stdout.write(chunk.delta.content)
}chatStream is the only model entry point; a non-streaming call is that
stream collected. In practice the kernel's run loop calls it and hands you
events.
Documentation
License
FSL-1.1-MIT, converting to MIT two years after each release.
