basalt / ai/src / OllamaProvider
Class: OllamaProvider
Defined in: ai/src/provider/ollama.ts:29
Local Ollama provider (/api/chat, stream: false). Needs no API key, so it's the zero-cost default for offline development and CI.
Implements
Constructors
Constructor
> new OllamaProvider(options?): OllamaProvider
Defined in: ai/src/provider/ollama.ts:35
Parameters
options?
Returns
OllamaProvider
Properties
model
> readonly model: string
Defined in: ai/src/provider/ollama.ts:31
Concrete model id in use, e.g. 'claude-sonnet-5'.
Implementation of
name
> readonly name: "ollama" = 'ollama'
Defined in: ai/src/provider/ollama.ts:30
Stable id, e.g. 'anthropic'.
Implementation of
Methods
generate()
> generate(options): Promise<string>
Defined in: ai/src/provider/ollama.ts:43
One-shot completion — returns the assistant's full text.
Parameters
options
Returns
Promise<string>
Implementation of
stream()
> stream(options): AsyncIterable<string>
Defined in: ai/src/provider/ollama.ts:61
Streaming completion — yields chunks as they arrive.
Parameters
options
Returns
AsyncIterable<string>