OllamaClient
Client for interacting with the Ollama API with comprehensive model support.
Implements:
LLMClient for executing prompts and streaming responses.
LLMEmbeddingProvider for generating embeddings from input text.
Parameters
A preconfigured Koog HTTP client used for API calls. Must have the Ollama base URL and timeouts already embedded. To create a client with standard defaults, use the secondary constructor that accepts a base URL and a KoogHttpClient.Factory.
Clock instance used for tracking response metadata timestamps.
The ContextWindowStrategy to use for computing context window lengths. Defaults to ContextWindowStrategy.None.
Generates JSON schemas for tool descriptors sent to the model.
Constructors
Secondary constructor that builds the underlying KoogHttpClient from a KoogHttpClient.Factory.
Functions
Returns a model card by its model name, on null if no such model exists on the server.
Returns the model cards for all the available models on the server.
Provides the type of Language Learning Model (LLM) provider used by the client.