EmbeddingModelSpec class final

Specification for an embedding model: a model file plus its tokenizer (.tflite, .onnx, …), or a single .litertlm bundle that carries its own tokenizer (isSelfContained).

Inheritance

Constructors

EmbeddingModelSpec({required String name, required ModelSource modelSource, ModelSource? tokenizerSource, String? modelFilename, String? tokenizerFilename, ModelReplacePolicy replacePolicy = ModelReplacePolicy.keep})
modelFilename and tokenizerFilename optionally pin the exact install identities independently from source URL basenames. Use them for immutable/versioned artifacts. Each must be a plain basename; when omitted, the historical source-derived namespacing behavior is retained.

Properties

files → List<ModelFile>
[model] for a self-contained spec, else [model, tokenizer] — in that order.
no setteroverride
hashCode → int
The hash code for this object.
no setteroverride
isSelfContained → bool
True exactly when there is no separate tokenizer file (tokenizerSource == null). In 2.3.0 that means a .litertlm bundle. Which engine runs it is each engine's own business.
no setter
isValid → bool
Whether this model specification is valid
no setterinherited
modelFilename → String?
The pinned model install filename, when one was given.
no setter
modelSource → ModelSource
Where the model comes from.
no setter
name → String
Human-readable name for this model
no setteroverride
replacePolicy → ModelReplacePolicy
Policy for replacing old models
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenizerFilename → String?
The pinned tokenizer install filename, when one was given.
no setter
tokenizerSource → ModelSource?
Where the tokenizer comes from; null for a self-contained spec.
no setter
type → ModelManagementType
Type of this model
no setteroverride

Methods

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.
override