@hackbuild/ai-views 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18183,7 +18183,10 @@ self.onmessage = async (ev) => {
|
|
|
18183
18183
|
}
|
|
18184
18184
|
};
|
|
18185
18185
|
}
|
|
18186
|
-
/**
|
|
18186
|
+
/**
|
|
18187
|
+
* Create an MLCEngine with the context ladder and WebLLM's IndexedDB cache (`cacheBackend:
|
|
18188
|
+
* "indexeddb"`; WebLLM's default is the Cache API, where `webllmCache` would find nothing), and wrap it.
|
|
18189
|
+
*/
|
|
18187
18190
|
async function loadWebLLM(o) {
|
|
18188
18191
|
const want = o.contextWindow ?? 4096;
|
|
18189
18192
|
const ladder = [.../* @__PURE__ */ new Set([
|
|
@@ -18193,7 +18196,7 @@ self.onmessage = async (ev) => {
|
|
|
18193
18196
|
2048
|
|
18194
18197
|
])].filter((n) => n <= want);
|
|
18195
18198
|
const appConfig = {
|
|
18196
|
-
|
|
18199
|
+
cacheBackend: "indexeddb",
|
|
18197
18200
|
model_list: [...o.customModels ?? [], ...o.module.prebuiltAppConfig?.model_list ?? []]
|
|
18198
18201
|
};
|
|
18199
18202
|
const errors = [];
|
|
@@ -18214,7 +18217,7 @@ self.onmessage = async (ev) => {
|
|
|
18214
18217
|
throw new ChatError$1("load", `webllm could not load ${o.modelId}: ${errors.join("; ")}`);
|
|
18215
18218
|
}
|
|
18216
18219
|
/**
|
|
18217
|
-
* Map WebLLM 0.2.84
|
|
18220
|
+
* Map WebLLM progress text (0.2.84 to 0.2.89) to a phase: "Fetching param cache" and
|
|
18218
18221
|
* "Loading model from cache" are fetch, "Loading GPU shader modules" is
|
|
18219
18222
|
* compile, "Finish loading" is ready. Unknown text keeps the last phase a
|
|
18220
18223
|
* caller saw; this returns fetch for it.
|
|
@@ -18255,8 +18258,8 @@ self.onmessage = async (ev) => {
|
|
|
18255
18258
|
/**
|
|
18256
18259
|
* List and evict the WebLLM cache per model, so the weights manager shows
|
|
18257
18260
|
* it as a second group ("kept by webllm") beside the one weight store.
|
|
18258
|
-
* Reads the IndexedDB layout WebLLM 0.2.84 writes with
|
|
18259
|
-
* `
|
|
18261
|
+
* Reads the IndexedDB layout WebLLM 0.2.84 to 0.2.89 writes with
|
|
18262
|
+
* `cacheBackend: "indexeddb"` (as `loadWebLLM` sets it); nothing is imported from WebLLM. Pass the
|
|
18260
18263
|
* same model_list the engine was built with (prebuilt plus custom).
|
|
18261
18264
|
*/
|
|
18262
18265
|
function webllmCache(o) {
|
package/dist/single/index.js
CHANGED
|
@@ -18181,7 +18181,10 @@ function webllmDriver(o) {
|
|
|
18181
18181
|
}
|
|
18182
18182
|
};
|
|
18183
18183
|
}
|
|
18184
|
-
/**
|
|
18184
|
+
/**
|
|
18185
|
+
* Create an MLCEngine with the context ladder and WebLLM's IndexedDB cache (`cacheBackend:
|
|
18186
|
+
* "indexeddb"`; WebLLM's default is the Cache API, where `webllmCache` would find nothing), and wrap it.
|
|
18187
|
+
*/
|
|
18185
18188
|
async function loadWebLLM(o) {
|
|
18186
18189
|
const want = o.contextWindow ?? 4096;
|
|
18187
18190
|
const ladder = [.../* @__PURE__ */ new Set([
|
|
@@ -18191,7 +18194,7 @@ async function loadWebLLM(o) {
|
|
|
18191
18194
|
2048
|
|
18192
18195
|
])].filter((n) => n <= want);
|
|
18193
18196
|
const appConfig = {
|
|
18194
|
-
|
|
18197
|
+
cacheBackend: "indexeddb",
|
|
18195
18198
|
model_list: [...o.customModels ?? [], ...o.module.prebuiltAppConfig?.model_list ?? []]
|
|
18196
18199
|
};
|
|
18197
18200
|
const errors = [];
|
|
@@ -18212,7 +18215,7 @@ async function loadWebLLM(o) {
|
|
|
18212
18215
|
throw new ChatError$1("load", `webllm could not load ${o.modelId}: ${errors.join("; ")}`);
|
|
18213
18216
|
}
|
|
18214
18217
|
/**
|
|
18215
|
-
* Map WebLLM 0.2.84
|
|
18218
|
+
* Map WebLLM progress text (0.2.84 to 0.2.89) to a phase: "Fetching param cache" and
|
|
18216
18219
|
* "Loading model from cache" are fetch, "Loading GPU shader modules" is
|
|
18217
18220
|
* compile, "Finish loading" is ready. Unknown text keeps the last phase a
|
|
18218
18221
|
* caller saw; this returns fetch for it.
|
|
@@ -18253,8 +18256,8 @@ function openExisting(idb, name) {
|
|
|
18253
18256
|
/**
|
|
18254
18257
|
* List and evict the WebLLM cache per model, so the weights manager shows
|
|
18255
18258
|
* it as a second group ("kept by webllm") beside the one weight store.
|
|
18256
|
-
* Reads the IndexedDB layout WebLLM 0.2.84 writes with
|
|
18257
|
-
* `
|
|
18259
|
+
* Reads the IndexedDB layout WebLLM 0.2.84 to 0.2.89 writes with
|
|
18260
|
+
* `cacheBackend: "indexeddb"` (as `loadWebLLM` sets it); nothing is imported from WebLLM. Pass the
|
|
18258
18261
|
* same model_list the engine was built with (prebuilt plus custom).
|
|
18259
18262
|
*/
|
|
18260
18263
|
function webllmCache(o) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hackbuild/ai-views",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Views that bind the browser AI packages to hackbuild-ui: a model picker per job, a chat pane and composer, a drop first transcriber, a mask studio, a frame view and a camera feed. Each ships as a Vue component and a custom element.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@hackbuild/ai-env": "0.1.2",
|
|
45
45
|
"@hackbuild/audio-dsp": "0.1.2",
|
|
46
|
-
"@hackbuild/chat": "0.1.
|
|
46
|
+
"@hackbuild/chat": "0.1.4",
|
|
47
47
|
"@hackbuild/devices": "0.1.6",
|
|
48
48
|
"@hackbuild/embed": "0.1.7",
|
|
49
49
|
"@hackbuild/imagegen": "0.2.5",
|