Creates an instance of the OllamaAdapter.
Configuration options.
ReadonlyproviderThe unique identifier name for this provider (e.g., 'openai', 'anthropic').
Sends a request to the Ollama API.
Translates ArtStandardPrompt to the OpenAI format and handles streaming and tool use.
The standardized prompt messages.
Call options.
A promise resolving to an AsyncIterable of StreamEvent objects.
Optional method for graceful shutdown. For Ollama, which is typically a separate local server, this adapter doesn't manage persistent connections that need explicit closing.
A promise that resolves when the shutdown is complete.
Implements the
ProviderAdapterinterface for interacting with Ollama's OpenAI-compatible API endpoint.Handles formatting requests, parsing responses, streaming, and tool use.
See