class

Smith::LLM::Ollama

Inherits Smith::LLM::Provider < Reference < Object

Constants

DEFAULT_HOST = "http://localhost:11434"
DEFAULT_MODEL = "gemma4:latest"

Constructors

new(host : String | Nil = nil, default_model : String = DEFAULT_MODEL, timeouts : Timeouts = Timeouts.default)
Source

Instance methods

complete(request : Request) : Response
Source
complete_streaming(request : Request, &on_delta : String -> Nil) : Response

smith talks to Ollama through its OpenAI-compatible endpoint, so the stream is plain OpenAI-shaped SSE rather than Ollama's own NDJSON.

Source
default_model
Source
host
Source
name
Source