web/web_model_source
library
Classes
-
BlobUrlModelSource
-
WebStorageMode.cacheApi / WebStorageMode.none path. url is a
blob: URL produced by WebCacheService / BlobUrlManager, or an
https: URL when caching is disabled.
-
OpfsStreamModelSource
-
WebStorageMode.streaming + opfs://<filename> path. Carries the
WebOPFSService and the OPFS filename so each engine can ask for
the form it consumes — MediaPipe wants a
ReadableStreamDefaultReader, @litert-lm/core wants the raw
ReadableStream.
-
WebModelSource
-
Result of resolving an active web model into a form an engine
(MediaPipe
LlmInference OR @litert-lm/core Engine) can consume.
-
WebModelSourceResolver
-
Resolves the active inference model from WebModelManager into the
correct WebModelSource subtype based on ServiceRegistry
useStreamingStorage and the resolved path prefix. This is the
single piece of code that decides blob-URL vs OPFS-stream — both
WebInferenceModel (MediaPipe) and LiteRtLmWebInferenceModel
(@litert-lm/core) consume it.