WindowLiteRtLmWebRuntime class final

The LiteRtLmWebRuntime of the page: window.litertLmReady and window.EmbeddingEngine.

Implemented types

Constructors

WindowLiteRtLmWebRuntime()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
missingMembers → List<String>
What window.EmbeddingEngine lacks of what this release calls, after ensureReady reported LiteRtLmWebRuntimeState.runtimeIncomplete; empty otherwise.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

create(LiteRtLmWebEngineSettings settings) → Future<LiteRtLmWebEngine>
EmbeddingEngine.create(settings).
override
ensureReady() → Future<LiteRtLmWebRuntimeState>
Waits for the page's loader (window.litertLmReady) when there is one, then reports whether window.EmbeddingEngine exists. Throws when the loader itself failed (the module could not be imported).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readPrefix(String url, int length) → Future<Uint8List>
fetch(url), read until length bytes arrived, then cancelled. An http(s): URL also asks for just that range (Range is a CORS-safelisted header); a blob: URL — the page's own copy, Cache API or OPFS — is a local read either way.
override
toString() → String
A string representation of this object.
inherited
webGpuSupport() → Future<LiteRtLmWebGpuSupport>
navigator.gpu.requestAdapter({powerPreference: 'high-performance'}): the adapter @litert-lm/core itself asks for before it creates a GPU engine (createDefaultWebGpuDevice in litertlm_web.js). The adapter is only looked at: the runtime requests its own device from its own adapter in EmbeddingEngine.create.
override

Operators

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