LlmPort class abstract
Abstract LLM Port interface.
- Implementers
Constructors
- LlmPort()
Properties
- capabilities → LlmCapabilities
-
Runtime capabilities of this LLM implementation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
complete(
LlmRequest request) → Future< LlmResponse> - Complete a request (required).
-
completeStream(
LlmRequest request) → Stream< LlmChunk> - Streaming completion (optional - check capabilities.streaming).
-
completeWithTools(
LlmRequest request, List< LlmTool> tools) → Future<LlmResponse> - Complete with tool calling (optional - check capabilities.toolCalling).
-
embed(
String text) → Future< List< double> > - Generate text embeddings (optional - check capabilities.embedding).
-
embedBatch(
List< String> texts) → Future<List< List< >double> > - Batch embeddings for efficiency.
-
hasCapability(
String capability) → bool - Check if a specific capability is supported.
-
isAvailable(
) → Future< bool> - Check if the LLM is available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
similarity(
String text1, String text2) → Future< double> - Compute semantic similarity using embeddings.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited