module

Smith::LLM::OpenAIStream

Reads an OpenAI-shaped chat completion stream.

Shared by OpenRouter, OpenAI and Ollama — smith talks to Ollama through its OpenAI-compatible /v1/chat/completions endpoint, so all three speak this format.

Class methods

read(io : IO, default_model : String, &on_delta : String -> Nil) : Response
Source