Package-level declarations

Types

Link copied to clipboard

Represents a strategy for computing the context window length for OllamaClient. Different implementations define specific approaches to computing the context window length. Based on the context window length computed by this strategy, Ollama will truncate the context window accordingly.

Link copied to clipboard
class OllamaClient @JvmOverloads constructor(val baseUrl: String = "http://localhost:11434", baseClient: HttpClient = HttpClient(), timeoutConfig: ConnectionTimeoutConfig = ConnectionTimeoutConfig(), clock: Clock = Clock.System, contextWindowStrategy: ContextWindowStrategy = ContextWindowStrategy.Companion.None, toolDescriptorConverter: ToolDescriptorSchemaGenerator = OllamaToolDescriptorSchemaGenerator()) : LLMClient

Client for interacting with the Ollama API with comprehensive model support.

Link copied to clipboard

Custom converters for specific Ollama models.

Link copied to clipboard

Represents metadata and configuration details about an Ollama model card. This class contains descriptive properties about the model, such as its name, family of models it belongs to, capabilities it supports, and specific technical attributes like parameter count and size.

Link copied to clipboard

Represents a collection of predefined Large Language Models (LLM) categorized by makers. Each maker contains specific models with configurations such as unique identifiers and capabilities.

Properties

Link copied to clipboard

Returns the model name without any associated tags. This property extracts and provides a clean version of the name property from the OllamaModelCard by removing any tags or additional decorations.

Functions

Link copied to clipboard
fun List<OllamaModelCard>.findBestSuitedModels(family: String? = null, maxSize: Long? = null, minParameterCount: Long? = null, minContextLength: Long? = null, minEmbeddingLength: Long? = null, requiredCapabilities: List<LLMCapability>? = null): List<OllamaModelCard>

Filters a list of model cards by the given criteria.

Link copied to clipboard

Finds a model card by name.

Link copied to clipboard

Converts an instance of OllamaModelCard to an LLModel representation.