LiteRtLmWebEmbedder class final

The .litertlm embedder on the web: text, images when declared on a bundle with a vision encoder, audio when declared on a bundle with an audio encoder, and any combination of them in one vector.

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>
Deletes the engine; waits for a call in flight inside the runtime. A call still queued on the page lock is refused when its turn comes.
embed(EmbedderInput input) → Future<List<double>>
The vector of input: its text (task prefix already in front), its images and its audio, as one request. Throws EmbedderInputTooLongException for an input the engine had to cut or split (never the cut or averaged vector), EmbedderEngineException for any other failure.
load() → Future<LiteRtLmWebEmbedderInfo>
Creates the engine and embeds the probe: the dimension, the input limit and that the vectors are usable. Runs once, before close. A load that fails, or is closed while it runs, deletes the engine it created before it returns.
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