webslm 0.0.0-stage → 0.2.0
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.
- package/LICENSE +21 -0
- package/README.md +373 -2
- package/dist/ai-sdk/index.d.ts +81 -0
- package/dist/ai-sdk/index.js +90 -0
- package/dist/ai-sdk/language-model.d.ts +77 -0
- package/dist/ai-sdk/language-model.js +422 -0
- package/dist/ai-sdk/loader.d.ts +54 -0
- package/dist/ai-sdk/loader.js +170 -0
- package/dist/ai-sdk/output.d.ts +43 -0
- package/dist/ai-sdk/output.js +152 -0
- package/dist/ai-sdk/prompt.d.ts +21 -0
- package/dist/ai-sdk/prompt.js +111 -0
- package/dist/async-queue.d.ts +22 -0
- package/dist/async-queue.js +70 -0
- package/dist/cache/cache-api.d.ts +29 -0
- package/dist/cache/cache-api.js +115 -0
- package/dist/cache/index.d.ts +21 -0
- package/dist/cache/index.js +42 -0
- package/dist/cache/memory.d.ts +12 -0
- package/dist/cache/memory.js +61 -0
- package/dist/cache/models.d.ts +67 -0
- package/dist/cache/models.js +107 -0
- package/dist/cache/node-fs.d.ts +21 -0
- package/dist/cache/node-fs.js +147 -0
- package/dist/cache/opfs.d.ts +69 -0
- package/dist/cache/opfs.js +181 -0
- package/dist/cache/store.d.ts +53 -0
- package/dist/cache/store.js +64 -0
- package/dist/cache-management.d.ts +23 -0
- package/dist/cache-management.js +58 -0
- package/dist/capabilities.d.ts +67 -0
- package/dist/capabilities.js +55 -0
- package/dist/client.d.ts +61 -0
- package/dist/client.js +256 -0
- package/dist/curated.d.ts +22 -0
- package/dist/curated.js +53 -0
- package/dist/download.d.ts +51 -0
- package/dist/download.js +289 -0
- package/dist/engine.d.ts +54 -0
- package/dist/engine.js +510 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.js +89 -0
- package/dist/hub.d.ts +185 -0
- package/dist/hub.js +409 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +41 -0
- package/dist/models.d.ts +225 -0
- package/dist/models.js +730 -0
- package/dist/node-pool-worker.d.ts +6 -0
- package/dist/node-pool-worker.js +32 -0
- package/dist/node-web-worker.d.ts +23 -0
- package/dist/node-web-worker.js +84 -0
- package/dist/node-worker.d.ts +2 -0
- package/dist/node-worker.js +9 -0
- package/dist/pool-worker.d.ts +36 -0
- package/dist/pool-worker.js +30 -0
- package/dist/pool.d.ts +17 -0
- package/dist/pool.js +41 -0
- package/dist/protocol.d.ts +246 -0
- package/dist/protocol.js +19 -0
- package/dist/runtime.d.ts +21 -0
- package/dist/runtime.js +53 -0
- package/dist/safetensors.d.ts +20 -0
- package/dist/safetensors.js +2 -0
- package/dist/simple.d.ts +310 -0
- package/dist/simple.js +553 -0
- package/dist/types.d.ts +412 -0
- package/dist/types.js +2 -0
- package/dist/wasm-flavour.d.ts +85 -0
- package/dist/wasm-flavour.js +169 -0
- package/dist/wasm.d.ts +34 -0
- package/dist/wasm.js +38 -0
- package/dist/worker.d.ts +6 -0
- package/dist/worker.js +11 -0
- package/package.json +92 -3
- package/wasm/relaxed/webslm_wasm.d.ts +325 -0
- package/wasm/relaxed/webslm_wasm.js +1899 -0
- package/wasm/relaxed/webslm_wasm_bg.wasm +0 -0
- package/wasm/relaxed/webslm_wasm_bg.wasm.d.ts +56 -0
- package/wasm/simd/webslm_wasm.d.ts +325 -0
- package/wasm/simd/webslm_wasm.js +1899 -0
- package/wasm/simd/webslm_wasm_bg.wasm +0 -0
- package/wasm/simd/webslm_wasm_bg.wasm.d.ts +56 -0
- package/wasm/threads/snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js +108 -0
- package/wasm/threads/webslm_wasm.d.ts +357 -0
- package/wasm/threads/webslm_wasm.js +2100 -0
- package/wasm/threads/webslm_wasm_bg.wasm +0 -0
- package/wasm/threads/webslm_wasm_bg.wasm.d.ts +66 -0
package/dist/simple.d.ts
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The simple API: {@link load}, {@link ask}, {@link stream} and
|
|
3
|
+
* {@link LLM.chat}, built on {@link loadModel}, {@link Model} and
|
|
4
|
+
* {@link Session}.
|
|
5
|
+
*/
|
|
6
|
+
import { type Model } from "./models.js";
|
|
7
|
+
import type { ChatMessage, LoadModelOptions, ModelInfo, ModelSource } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The model {@link load}, {@link ask} and {@link stream} use when none is
|
|
10
|
+
* given: SmolLM2 360M Instruct, small (about 720 MB to download once),
|
|
11
|
+
* ungated and quick on the CPU.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_MODEL = "HuggingFaceTB/SmolLM2-360M-Instruct";
|
|
14
|
+
/** Sampling temperature used when neither the call nor the checkpoint's `generation_config.json` sets one. */
|
|
15
|
+
export declare const DEFAULT_TEMPERATURE = 0.7;
|
|
16
|
+
/** Largest number of new tokens of an answer, unless `maxTokens` says otherwise. */
|
|
17
|
+
export declare const DEFAULT_MAX_TOKENS = 512;
|
|
18
|
+
/** Options of every generation of the simple API. All are optional. */
|
|
19
|
+
export interface PromptOptions {
|
|
20
|
+
/** Largest number of new tokens (default 512). Reasoning counts towards it. */
|
|
21
|
+
readonly maxTokens?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Sampling temperature; `0` is greedy (deterministic) decoding. Defaults to
|
|
24
|
+
* the checkpoint's `generation_config.json` value, else 0.7.
|
|
25
|
+
*/
|
|
26
|
+
readonly temperature?: number;
|
|
27
|
+
/** System prompt sent before the user message. */
|
|
28
|
+
readonly system?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether a model that can reason before answering (Qwen3, for example)
|
|
31
|
+
* should do so: sets the chat template's `enable_thinking`. Ignored by
|
|
32
|
+
* models whose template has no such switch. Unset, the template decides
|
|
33
|
+
* (Qwen3 thinks by default).
|
|
34
|
+
*/
|
|
35
|
+
readonly think?: boolean;
|
|
36
|
+
/** Strings that end the answer (not included in it). */
|
|
37
|
+
readonly stop?: readonly string[];
|
|
38
|
+
/** Seed of the sampler, for reproducible sampling at a temperature above 0. */
|
|
39
|
+
readonly seed?: number;
|
|
40
|
+
/** Sampling: keep the k most likely tokens (0 disables). */
|
|
41
|
+
readonly topK?: number;
|
|
42
|
+
/** Sampling: nucleus threshold (1 disables). */
|
|
43
|
+
readonly topP?: number;
|
|
44
|
+
/** Sampling: drop tokens less likely than this fraction of the best one. */
|
|
45
|
+
readonly minP?: number;
|
|
46
|
+
/** Penalty on tokens already in the context (1 disables). */
|
|
47
|
+
readonly repetitionPenalty?: number;
|
|
48
|
+
/** Penalty on tokens already generated, once each (0 disables). */
|
|
49
|
+
readonly presencePenalty?: number;
|
|
50
|
+
/** Penalty on tokens already generated, per occurrence (0 disables). */
|
|
51
|
+
readonly frequencyPenalty?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Answer with a JSON object (constrained decoding); parse it with
|
|
54
|
+
* `JSON.parse`. See also `schema`.
|
|
55
|
+
*/
|
|
56
|
+
readonly json?: boolean;
|
|
57
|
+
/** Answer with JSON following this JSON schema (supported subset: see `GenerateOptions.schema`). */
|
|
58
|
+
readonly schema?: Readonly<Record<string, unknown>> | boolean;
|
|
59
|
+
/** Most tokens of reasoning before the model must answer (models that think, like Qwen3). */
|
|
60
|
+
readonly thinkingBudget?: number;
|
|
61
|
+
/** Stop when the answer starts repeating itself. */
|
|
62
|
+
readonly loopDetection?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* When the context is full, drop the oldest turns (keeping the system
|
|
65
|
+
* prompt) instead of stopping: long chats keep going.
|
|
66
|
+
*/
|
|
67
|
+
readonly contextShift?: boolean;
|
|
68
|
+
/** Extra chat template variables, passed as is (`think` sets `enable_thinking`). */
|
|
69
|
+
readonly templateKwargs?: Readonly<Record<string, unknown>>;
|
|
70
|
+
/** Aborts the generation: `ask` then rejects with a `WebslmError` whose code is `"ABORTED"`. */
|
|
71
|
+
readonly signal?: AbortSignal;
|
|
72
|
+
/** Called with each piece of the answer as it is generated (reasoning excluded). */
|
|
73
|
+
readonly onToken?: (text: string) => void;
|
|
74
|
+
/** Called with each piece of the reasoning, for models that think before answering. */
|
|
75
|
+
readonly onReasoning?: (text: string) => void;
|
|
76
|
+
}
|
|
77
|
+
/** Options of {@link LLM.ask} and {@link Chat.send}. */
|
|
78
|
+
export interface AskOptions extends PromptOptions {
|
|
79
|
+
/**
|
|
80
|
+
* Resolve to `{ text, reasoning }` instead of the answer alone, to read
|
|
81
|
+
* what a reasoning model thought before answering.
|
|
82
|
+
*/
|
|
83
|
+
readonly withReasoning?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** An answer with the reasoning that preceded it (`""` when the model did not reason). */
|
|
86
|
+
export interface Answer {
|
|
87
|
+
/** The answer, without the reasoning block. */
|
|
88
|
+
readonly text: string;
|
|
89
|
+
/** The content of the `<think>…</think>` block, trimmed. */
|
|
90
|
+
readonly reasoning: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A streamed answer: iterate it with `for await` for pieces of text as they
|
|
94
|
+
* are generated (reasoning excluded).
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* const answer = stream("Tell me a story");
|
|
98
|
+
* for await (const text of answer) process.stdout.write(text);
|
|
99
|
+
* console.log(await answer.reasoning);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export interface TextStream extends AsyncIterable<string> {
|
|
103
|
+
/** The whole answer, once generated. Rejects with the generation's error. */
|
|
104
|
+
readonly text: Promise<string>;
|
|
105
|
+
/** The whole reasoning (`""` when the model did not reason), once generated. */
|
|
106
|
+
readonly reasoning: Promise<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Stops the generation. The stream then ends normally and `text` resolves
|
|
109
|
+
* to what was generated so far. Leaving a `for await` loop early stops it too.
|
|
110
|
+
*/
|
|
111
|
+
stop(): void;
|
|
112
|
+
}
|
|
113
|
+
/** Options of {@link LLM.chat}. */
|
|
114
|
+
export interface ChatOptions {
|
|
115
|
+
/** System prompt of the conversation. */
|
|
116
|
+
readonly system?: string;
|
|
117
|
+
/** Turns to start from (user and assistant messages). */
|
|
118
|
+
readonly messages?: readonly ChatMessage[];
|
|
119
|
+
/** Default options of every turn; those given to `send` or `stream` take precedence. */
|
|
120
|
+
readonly defaults?: Omit<AskOptions, "system" | "signal" | "onToken" | "onReasoning" | "withReasoning">;
|
|
121
|
+
}
|
|
122
|
+
/** Options of {@link Chat.send} and {@link Chat.stream}: the conversation sets the system prompt. */
|
|
123
|
+
export type ChatTurnOptions = Omit<AskOptions, "system">;
|
|
124
|
+
/**
|
|
125
|
+
* A conversation that remembers its turns. Each conversation keeps its own
|
|
126
|
+
* cache in the engine, so a turn only processes the new message.
|
|
127
|
+
*
|
|
128
|
+
* ```ts
|
|
129
|
+
* const chat = llm.chat({ system: "You are concise." });
|
|
130
|
+
* await chat.send("My name is Ana.");
|
|
131
|
+
* for await (const text of chat.stream("What is my name?")) process.stdout.write(text);
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export interface Chat {
|
|
135
|
+
/** The system prompt, if any. */
|
|
136
|
+
readonly system: string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* The conversation so far: user messages and the answers (without their
|
|
139
|
+
* reasoning). A turn is added once its answer is complete or stopped.
|
|
140
|
+
*/
|
|
141
|
+
readonly history: readonly ChatMessage[];
|
|
142
|
+
/** Sends a user message and resolves to the answer. Turns run one after the other. */
|
|
143
|
+
send(content: string, options: ChatTurnOptions & {
|
|
144
|
+
readonly withReasoning: true;
|
|
145
|
+
}): Promise<Answer>;
|
|
146
|
+
send(content: string, options?: ChatTurnOptions & {
|
|
147
|
+
readonly withReasoning?: false;
|
|
148
|
+
}): Promise<string>;
|
|
149
|
+
send(content: string, options?: ChatTurnOptions): Promise<string | Answer>;
|
|
150
|
+
/** Sends a user message and streams the answer. */
|
|
151
|
+
stream(content: string, options?: Omit<ChatTurnOptions, "withReasoning">): TextStream;
|
|
152
|
+
/** Forgets every turn (the system prompt stays). A turn in progress is not recorded. */
|
|
153
|
+
reset(): void;
|
|
154
|
+
/** Frees the conversation's cache in the engine. Later turns reject with `DISPOSED`. */
|
|
155
|
+
dispose(): Promise<void>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A loaded model with simple methods. `ask` and `stream` are single-turn
|
|
159
|
+
* (nothing is remembered between calls); `chat` starts a conversation.
|
|
160
|
+
* Calls on one model run one after the other.
|
|
161
|
+
*
|
|
162
|
+
* ```ts
|
|
163
|
+
* const llm = await load("HuggingFaceTB/SmolLM2-360M-Instruct");
|
|
164
|
+
* console.log(await llm.ask("Write a haiku about the sea"));
|
|
165
|
+
* await llm.unload();
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export interface LLM {
|
|
169
|
+
/** Architecture, sizes, quant, backend and the files loaded. */
|
|
170
|
+
readonly info: ModelInfo;
|
|
171
|
+
/** The underlying {@link Model}, for the advanced API (sessions, scoring, raw options). */
|
|
172
|
+
readonly model: Model;
|
|
173
|
+
/** Answers a single prompt. */
|
|
174
|
+
ask(prompt: string, options: AskOptions & {
|
|
175
|
+
readonly withReasoning: true;
|
|
176
|
+
}): Promise<Answer>;
|
|
177
|
+
ask(prompt: string, options?: AskOptions & {
|
|
178
|
+
readonly withReasoning?: false;
|
|
179
|
+
}): Promise<string>;
|
|
180
|
+
ask(prompt: string, options?: AskOptions): Promise<string | Answer>;
|
|
181
|
+
/** Streams the answer to a single prompt. */
|
|
182
|
+
stream(prompt: string, options?: PromptOptions): TextStream;
|
|
183
|
+
/** Starts a conversation that remembers its turns. */
|
|
184
|
+
chat(options?: ChatOptions): Chat;
|
|
185
|
+
/** Frees the model and stops its worker. Every later call rejects with `DISPOSED`. */
|
|
186
|
+
unload(): Promise<void>;
|
|
187
|
+
}
|
|
188
|
+
/** Options of the module-level {@link ask}: {@link AskOptions} plus the model to use. */
|
|
189
|
+
export interface SharedAskOptions extends AskOptions {
|
|
190
|
+
/**
|
|
191
|
+
* Hugging Face repository id or {@link ModelSource} (default
|
|
192
|
+
* {@link DEFAULT_MODEL}). Loaded on first use, then shared by every
|
|
193
|
+
* module-level call with the same model until {@link unloadAll}.
|
|
194
|
+
*/
|
|
195
|
+
readonly model?: string | ModelSource;
|
|
196
|
+
}
|
|
197
|
+
/** Options of the module-level {@link stream}. */
|
|
198
|
+
export type SharedStreamOptions = Omit<SharedAskOptions, "withReasoning">;
|
|
199
|
+
/** @internal Receives the answer and the reasoning of a {@link ReasoningSplitter}. */
|
|
200
|
+
export interface Sink {
|
|
201
|
+
text(text: string): void;
|
|
202
|
+
reasoning(text: string): void;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Separates a leading `<think>…</think>` block from the answer, on a stream
|
|
206
|
+
* of text pieces. Tags split across pieces are handled; the whitespace
|
|
207
|
+
* around the reasoning and at the start of the answer is dropped.
|
|
208
|
+
*/
|
|
209
|
+
export declare class ReasoningSplitter {
|
|
210
|
+
#private;
|
|
211
|
+
/** @param opened The prompt already opened the block (the template ends with `<think>`). */
|
|
212
|
+
constructor(sink: Sink, opened: boolean);
|
|
213
|
+
/** Whether the text so far ends inside an unclosed reasoning block. */
|
|
214
|
+
get inReasoning(): boolean;
|
|
215
|
+
push(text: string): void;
|
|
216
|
+
/** Flushes what is held back, at the end of the generation. */
|
|
217
|
+
end(): void;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Splits a model's output into its answer and the `<think>…</think>` block
|
|
221
|
+
* that reasoning models (Qwen3, LFM thinking checkpoints...) write first.
|
|
222
|
+
* Text without such a block is all answer. `open` is `true` while the block
|
|
223
|
+
* is not closed yet (a stream still thinking, or an answer cut by `maxTokens`).
|
|
224
|
+
*
|
|
225
|
+
* ```ts
|
|
226
|
+
* splitReasoning("<think>\nThe user greets me.\n</think>\n\nHello!");
|
|
227
|
+
* // { text: "Hello!", reasoning: "The user greets me.", open: false }
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export declare function splitReasoning(output: string): Answer & {
|
|
231
|
+
readonly open: boolean;
|
|
232
|
+
};
|
|
233
|
+
/** @internal Runs async functions one at a time, in call order. */
|
|
234
|
+
export declare class Lock {
|
|
235
|
+
#private;
|
|
236
|
+
run<T>(fn: () => Promise<T>): Promise<T>;
|
|
237
|
+
}
|
|
238
|
+
/** @internal How the chat template treats reasoning, probed once per model. */
|
|
239
|
+
export interface TemplateTraits {
|
|
240
|
+
/** The template reads `enable_thinking`. */
|
|
241
|
+
readonly thinkingSwitch: boolean;
|
|
242
|
+
/** Whether the rendered prompt ends inside an opened `<think>` block, by `think` value. */
|
|
243
|
+
readonly opensReasoning: (think: boolean | undefined) => boolean;
|
|
244
|
+
}
|
|
245
|
+
/** @internal Renders a probe conversation to see how a model's template handles reasoning. */
|
|
246
|
+
export declare function probeTemplateTraits(model: Pick<Model, "info" | "renderChat">): Promise<TemplateTraits>;
|
|
247
|
+
/**
|
|
248
|
+
* Loads a model and returns a handle with simple methods. Every argument is
|
|
249
|
+
* optional: the model defaults to {@link DEFAULT_MODEL}, and the options are
|
|
250
|
+
* those of {@link loadModel} (device `"auto"`, quant `"q8"`, a worker, the
|
|
251
|
+
* offline cache).
|
|
252
|
+
*
|
|
253
|
+
* The first load downloads the checkpoint from the Hugging Face Hub into the
|
|
254
|
+
* cache (OPFS in browsers, `~/.cache/webslm` in Node); later loads read it
|
|
255
|
+
* from there without network.
|
|
256
|
+
*
|
|
257
|
+
* ```ts
|
|
258
|
+
* import { load } from "webslm";
|
|
259
|
+
*
|
|
260
|
+
* const llm = await load("HuggingFaceTB/SmolLM2-360M-Instruct", {
|
|
261
|
+
* onProgress: (p) => console.log(p.phase, p.overallLoadedBytes, p.overallTotalBytes),
|
|
262
|
+
* });
|
|
263
|
+
* console.log(await llm.ask("Write a haiku about the sea"));
|
|
264
|
+
*
|
|
265
|
+
* const chat = llm.chat({ system: "You are concise." });
|
|
266
|
+
* await chat.send("My name is Ana.");
|
|
267
|
+
* console.log(await chat.send("What is my name?"));
|
|
268
|
+
* await llm.unload();
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @param model A Hugging Face repository id, or a {@link ModelSource} (local files, a custom store).
|
|
272
|
+
* @param options Load options; see {@link LoadModelOptions}.
|
|
273
|
+
*/
|
|
274
|
+
export declare function load(model?: string | ModelSource, options?: LoadModelOptions): Promise<LLM>;
|
|
275
|
+
/**
|
|
276
|
+
* Answers a prompt with a model loaded on first use and kept for later
|
|
277
|
+
* calls (see {@link unloadAll}).
|
|
278
|
+
*
|
|
279
|
+
* ```ts
|
|
280
|
+
* import { ask } from "webslm";
|
|
281
|
+
*
|
|
282
|
+
* const text = await ask("Write a haiku about the sea"); // DEFAULT_MODEL
|
|
283
|
+
* const fact = await ask("What is 2 + 2?", { model: "Qwen/Qwen3-0.6B", think: false });
|
|
284
|
+
* const { text: answer, reasoning } = await ask("Is 97 prime?", {
|
|
285
|
+
* model: "Qwen/Qwen3-0.6B",
|
|
286
|
+
* withReasoning: true,
|
|
287
|
+
* });
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
export declare function ask(prompt: string, options: SharedAskOptions & {
|
|
291
|
+
readonly withReasoning: true;
|
|
292
|
+
}): Promise<Answer>;
|
|
293
|
+
export declare function ask(prompt: string, options?: SharedAskOptions & {
|
|
294
|
+
readonly withReasoning?: false;
|
|
295
|
+
}): Promise<string>;
|
|
296
|
+
export declare function ask(prompt: string, options?: SharedAskOptions): Promise<string | Answer>;
|
|
297
|
+
/**
|
|
298
|
+
* Streams the answer to a prompt with a model loaded on first use and kept
|
|
299
|
+
* for later calls (see {@link unloadAll}). The stream yields pieces of the
|
|
300
|
+
* answer; `text` and `reasoning` resolve once it is complete.
|
|
301
|
+
*
|
|
302
|
+
* ```ts
|
|
303
|
+
* import { stream } from "webslm";
|
|
304
|
+
*
|
|
305
|
+
* for await (const text of stream("Tell me a story")) process.stdout.write(text);
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
export declare function stream(prompt: string, options?: SharedStreamOptions): TextStream;
|
|
309
|
+
/** Unloads every model loaded by the module-level {@link ask} and {@link stream}. */
|
|
310
|
+
export declare function unloadAll(): Promise<void>;
|