Ollama class

Constructors

Ollama({Uri? baseUrl})
Create a new Ollama client.

Properties

baseUrl Uri
The base URL for the Ollama API.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

chat(List<ChatMessage> messages, {required String model, String? format, String? template, ModelOptions? options, bool chunked = true}) Stream<CompletionChunk>
Generate the next message in a chat with a provided model.
embeddings(String prompt, {required String model, ModelOptions? options}) Future<List<double>>
Generate embeddings from a model for a given prompt.
generate(String prompt, {required String model, List<String>? images, String? system, String? format, String? template, ModelOptions? options, bool chunked = true, bool raw = false, List<int>? context}) Stream<CompletionChunk>
Generate a response for a given prompt with a provided model.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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