You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The `"cross-origin"` backend requires installing and enabling a compatible browser extension.
174
+
- Cross-origin backend currently does not support programmatic tensor-cache deletion; clearing is extension-managed.
175
+
153
176
### Chat Completion
154
177
After successfully initializing the engine, you can now invoke chat completions using OpenAI style chat APIs through the `engine.chat.completions` interface. For the full list of parameters and their descriptions, check [section below](#full-openai-compatibility) and [OpenAI API reference](https://platform.openai.com/docs/api-reference/chat/create).
Copy file name to clipboardExpand all lines: examples/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ These examples demonstrate various capabilities via WebLLM's OpenAI-like API.
47
47
48
48
-[logit-processor](logit-processor): while `logit_bias` is supported, we additionally support stateful logit processing where users can specify their own rules. We also expose low-level API `forwardTokensAndSample()`.
49
49
-[cache-usage](cache-usage): demonstrates how WebLLM supports multiple cache backends. Choose between the [Cache API](https://developer.mozilla.org/en-US/docs/Web/API/Cache), [IndexedDB cache](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API), or the experimental Chrome [Cross-Origin Storage](https://github.com/explainers-by-googlers/cross-origin-storage) extension via `appConfig.cacheBackend`. Also demonstrates various cache utils such as checking
50
-
whether a model is cached, deleting a model's weights from cache, deleting a model library wasm from cache, etc.
50
+
whether a model is cached, deleting a model's weights from cache, deleting a model library wasm from cache, etc. Note: cross-origin backend currently does not support programmatic tensor-cache deletion.
51
51
-[simple-chat-upload](simple-chat-upload): demonstrates how to upload local models to WebLLM instead of downloading via a URL link
Copy file name to clipboardExpand all lines: examples/cache-usage/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,10 @@ setting `AppConfig.cacheBackend` to `"cache"`, `"indexeddb"`, or `"cross-origin"
5
5
This folder provides an example on how different caches are used in WebLLM. We also
6
6
demonstrate the utility cache functions such as deleting models, checking if models are in cache, etc.
7
7
8
-
> **Note:** The cross-origin backend requires installation of the [cross-origin storage browser extension](https://github.com/web-ai-community/cross-origin-storage-extension).
8
+
> **Note:** The cross-origin backend requires installation of the [cross-origin storage browser extension](https://github.com/web-ai-community/cross-origin-storage-extension). This does not currently support programmatic tensor-cache deletion; deletion is extension-managed.
9
9
10
-
For more information about the two caches, see: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#what_technologies_store_data_in_the_browser.
10
+
For more information about Cache API and IndexedDB, see:
0 commit comments