LLMChatRepository class abstract

Abstract repository interface for LLM chat operations.

Implement this interface to create backends for different LLM providers (e.g., Ollama, ChatGPT, llama.cpp).

Implementers

Constructors

LLMChatRepository()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchEmbed({required String model, required List<String> messages, Map<String, dynamic> options = const {}}) → Future<List<LLMEmbedding>>
Generates embeddings for multiple texts in a single call.
capabilitiesForModel(String model) → LLMCapabilities
Reports repository/model capabilities.
chatResponse(String model, {required List<LLMMessage> messages, bool think = false, List<LLMTool> tools = const [], dynamic extra, LLMChatOptions? options}) → Future<LLMResponse>
Generates a complete (non-streaming) chat response from the LLM.
embed({required String model, required List<String> messages, Map<String, dynamic> options = const {}}) → Future<List<LLMEmbedding>>
Generates embeddings for the given texts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
streamChat(String model, {required List<LLMMessage> messages, bool think = false, List<LLMTool> tools = const [], dynamic extra, LLMChatOptions? options}) → Stream<LLMChunk>
Streams a chat response from the LLM.
toString() → String
A string representation of this object.
inherited

Operators

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