OllamaProvider class

Ollama provider implementation

This provider implements multiple capabilities and delegates to specialized capability modules for different functionalities. Ollama is designed for local deployment and supports various models.

Implemented types

Constructors

OllamaProvider.new(OllamaConfig config)

Properties

config OllamaConfig
final
hashCode int
The hash code for this object.
no setterinherited
isLocal bool
Check if this is a local deployment
no setter
modelFamily String
Get model family information
no setter
providerName String
Get provider name
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedCapabilities Set<LLMCapability>
Set of capabilities this provider supports
no setteroverride
supportsEmbeddings bool
Check if embeddings are supported by current model
no setter

Methods

chat(List<ChatMessage> messages) Future<ChatResponse>
Sends a chat request to the provider with a sequence of messages.
override
chatStream(List<ChatMessage> messages, {List<Tool>? tools}) Stream<ChatStreamEvent>
Sends a streaming chat request to the provider
override
chatWithTools(List<ChatMessage> messages, List<Tool>? tools) Future<ChatResponse>
Sends a chat request to the provider with a sequence of messages and tools.
override
complete(CompletionRequest request) Future<CompletionResponse>
Sends a completion request to generate text
override
embed(List<String> input) Future<List<List<double>>>
Generate embeddings for the given input texts
override
memoryContents() Future<List<ChatMessage>?>
Get current memory contents if provider supports memory
override
models() Future<List<AIModel>>
Get available models from the provider
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
summarizeHistory(List<ChatMessage> messages) Future<String>
Summarizes a conversation history into a concise 2-3 sentence summary
override
supports(LLMCapability capability) bool
Check if this provider supports a specific capability
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited