What an engine runs: in core's worker isolate on native, inline on the page on web.
Lifecycle: build → load → embed* → close. Core calls each from one
place, one at a time, never concurrently. Engines that tokenize in Dart
extend TokenEmbeddingPass instead of implementing this directly.
- Implementers
Constructors
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
-
close(
) → Future< void> - Frees everything the pass holds. Called exactly once by core on every path after construction (load failure, close, host shutdown). Idempotent; must not throw for a pass that never loaded.
-
embed(
EmbeddingInput input, TaskType taskType) → Future< List< double> > -
The FINAL vector for
input— pooled and L2-normalised, of lengthEmbeddingPassInfo.dimension. -
load(
) → Future< EmbeddingPassInfo> -
Loads the model and reports what it can do. Called once. On a throw core
calls close and reports
EmbeddingLoadException(anEmbeddingLoadExceptionthrown here keeps its code and message). -
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