@qvac/sdk 0.10.2 → 0.11.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/NOTICE +92 -54
- package/dist/client/api/cancel.d.ts +24 -32
- package/dist/client/api/cancel.js +58 -31
- package/dist/client/api/client-request-id.d.ts +17 -0
- package/dist/client/api/client-request-id.js +27 -0
- package/dist/client/api/completion-stream.d.ts +1 -1
- package/dist/client/api/completion-stream.js +34 -3
- package/dist/client/api/diffusion.d.ts +46 -0
- package/dist/client/api/diffusion.js +50 -1
- package/dist/client/api/download-asset.d.ts +12 -2
- package/dist/client/api/download-asset.js +21 -3
- package/dist/client/api/embed.d.ts +8 -4
- package/dist/client/api/embed.js +14 -1
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/index.d.ts +1 -0
- package/dist/client/api/index.js +1 -0
- package/dist/client/api/load-model.d.ts +12 -4
- package/dist/client/api/load-model.js +25 -1
- package/dist/client/api/rag.d.ts +9 -3
- package/dist/client/api/rag.js +23 -3
- package/dist/client/api/transcribe.d.ts +20 -8
- package/dist/client/api/transcribe.js +58 -4
- package/dist/client/api/unload-model.d.ts +5 -2
- package/dist/client/api/unload-model.js +9 -4
- package/dist/client/api/upscale.d.ts +45 -0
- package/dist/client/api/upscale.js +99 -0
- package/dist/client/rpc/expo-rpc-client.js +2 -1
- package/dist/client/rpc/node-rpc-client.js +18 -7
- package/dist/client/rpc/rpc-client.d.ts +2 -2
- package/dist/client/rpc/rpc-client.js +10 -4
- package/dist/client/rpc/rpc-error.d.ts +9 -0
- package/dist/client/rpc/rpc-error.js +92 -0
- package/dist/examples/cancel-by-request-id.d.ts +38 -0
- package/dist/examples/cancel-by-request-id.js +103 -0
- package/dist/examples/diffusion-esrgan-upscale.d.ts +2 -0
- package/dist/examples/diffusion-esrgan-upscale.js +78 -0
- package/dist/examples/download-with-cancel.js +10 -10
- package/dist/examples/embed-multi-gpu.d.ts +2 -0
- package/dist/examples/embed-multi-gpu.js +46 -0
- package/dist/examples/llamacpp-multi-gpu.d.ts +2 -0
- package/dist/examples/llamacpp-multi-gpu.js +57 -0
- package/dist/examples/rag/rag-hyperdb/cancellation.js +20 -17
- package/dist/examples/tools/llamacpp-tools-gemma4.d.ts +2 -0
- package/dist/examples/tools/llamacpp-tools-gemma4.js +76 -0
- package/dist/examples/tools/llamacpp-tools-qwen35.d.ts +2 -0
- package/dist/examples/tools/llamacpp-tools-qwen35.js +70 -0
- package/dist/examples/transcription/whispercpp-microphone-conversation.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +102 -0
- package/dist/examples/tts/supertonic.js +1 -1
- package/dist/expo/plugins/withMobileBundle.d.ts +20 -4
- package/dist/expo/plugins/withMobileBundle.js +44 -6
- package/dist/index.d.ts +5 -2
- package/dist/index.js +21 -1
- package/dist/models/registry/models.d.ts +186 -318
- package/dist/models/registry/models.js +1522 -1667
- package/dist/pear/pre.d.ts +3 -0
- package/dist/pear/pre.js +3 -0
- package/dist/schemas/cancel.d.ts +167 -28
- package/dist/schemas/cancel.js +119 -19
- package/dist/schemas/common.d.ts +427 -208
- package/dist/schemas/common.js +3 -1
- package/dist/schemas/completion-event.d.ts +14 -0
- package/dist/schemas/completion-event.js +11 -1
- package/dist/schemas/completion-stream.d.ts +15 -1
- package/dist/schemas/completion-stream.js +25 -7
- package/dist/schemas/download-asset.d.ts +15 -9
- package/dist/schemas/download-asset.js +17 -6
- package/dist/schemas/embed.d.ts +1 -0
- package/dist/schemas/embed.js +5 -0
- package/dist/schemas/error.d.ts +31 -0
- package/dist/schemas/error.js +29 -1
- package/dist/schemas/finetune.d.ts +2 -0
- package/dist/schemas/finetune.js +5 -0
- package/dist/schemas/get-model-info.d.ts +6 -6
- package/dist/schemas/llamacpp-config.d.ts +54 -8
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +1911 -1260
- package/dist/schemas/load-model.js +15 -0
- package/dist/schemas/model-src-utils.d.ts +14 -14
- package/dist/schemas/model-types.d.ts +10 -10
- package/dist/schemas/ocr.d.ts +3 -3
- package/dist/schemas/plugin.d.ts +40 -1
- package/dist/schemas/plugin.js +10 -1
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +17 -9
- package/dist/schemas/registry.d.ts +30 -30
- package/dist/schemas/reload-config.d.ts +14 -14
- package/dist/schemas/sdcpp-config.d.ts +131 -17
- package/dist/schemas/sdcpp-config.js +163 -1
- package/dist/schemas/sdk-config.d.ts +649 -271
- package/dist/schemas/sdk-errors-client.d.ts +1 -0
- package/dist/schemas/sdk-errors-client.js +5 -0
- package/dist/schemas/sdk-errors-server.d.ts +5 -0
- package/dist/schemas/sdk-errors-server.js +25 -0
- package/dist/schemas/text-to-speech.d.ts +78 -78
- package/dist/schemas/transcription-config.d.ts +24 -24
- package/dist/schemas/transcription.d.ts +56 -2
- package/dist/schemas/transcription.js +27 -0
- package/dist/schemas/translate.d.ts +2 -0
- package/dist/schemas/translate.js +13 -2
- package/dist/schemas/translation-config.d.ts +40 -40
- package/dist/schemas/unload-model.d.ts +2 -1
- package/dist/schemas/unload-model.js +4 -1
- package/dist/scripts/run-unit-tests.js +15 -2
- package/dist/server/bare/ops/cancel.d.ts +27 -1
- package/dist/server/bare/ops/cancel.js +36 -10
- package/dist/server/bare/ops/embed.d.ts +3 -3
- package/dist/server/bare/ops/embed.js +144 -28
- package/dist/server/bare/ops/kv-cache-utils.d.ts +0 -7
- package/dist/server/bare/ops/kv-cache-utils.js +8 -47
- package/dist/server/bare/ops/transcribe.d.ts +10 -5
- package/dist/server/bare/ops/transcribe.js +196 -41
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +197 -88
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +12 -3
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +170 -172
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +125 -21
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +154 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +448 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +21 -73
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +18 -101
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +30 -3
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +157 -85
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +10 -0
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +34 -0
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +7 -0
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +10 -1
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -15
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +5 -1
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +3 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +3 -0
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +39 -39
- package/dist/server/bare/plugins/onnx-tts/plugin.js +6 -0
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +29 -21
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +4 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +8 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +40 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +91 -16
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +97 -7
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +22 -3
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +50 -14
- package/dist/server/bare/rag-hyperdb/index.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/index.js +1 -1
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.d.ts +26 -4
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +65 -28
- package/dist/server/bare/runtime/disposable-scope.d.ts +36 -0
- package/dist/server/bare/runtime/disposable-scope.js +69 -0
- package/dist/server/bare/runtime/index.d.ts +8 -0
- package/dist/server/bare/runtime/index.js +3 -0
- package/dist/server/bare/runtime/request-context.d.ts +49 -0
- package/dist/server/bare/runtime/request-context.js +1 -0
- package/dist/server/bare/runtime/request-id.d.ts +12 -0
- package/dist/server/bare/runtime/request-id.js +14 -0
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +4 -0
- package/dist/server/bare/runtime/request-registry-singleton.js +27 -0
- package/dist/server/bare/runtime/request-registry.d.ts +136 -0
- package/dist/server/bare/runtime/request-registry.js +297 -0
- package/dist/server/bare/runtime/with-request-context.d.ts +22 -0
- package/dist/server/bare/runtime/with-request-context.js +53 -0
- package/dist/server/bare/types/addon-responses.d.ts +11 -1
- package/dist/server/rpc/handler-registry.js +26 -7
- package/dist/server/rpc/handlers/cancel-delegated.js +28 -31
- package/dist/server/rpc/handlers/cancelHandler.d.ts +30 -1
- package/dist/server/rpc/handlers/cancelHandler.js +54 -22
- package/dist/server/rpc/handlers/delete-cache.d.ts +9 -0
- package/dist/server/rpc/handlers/delete-cache.js +13 -15
- package/dist/server/rpc/handlers/download-asset.js +133 -40
- package/dist/server/rpc/handlers/index.d.ts +2 -0
- package/dist/server/rpc/handlers/index.js +2 -0
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +60 -2
- package/dist/server/rpc/handlers/load-model/download-manager.js +141 -8
- package/dist/server/rpc/handlers/load-model/handler.js +213 -98
- package/dist/server/rpc/handlers/load-model/http.js +3 -3
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +1 -1
- package/dist/server/rpc/handlers/load-model/registry.js +1 -1
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +20 -1
- package/dist/server/rpc/handlers/load-model/resolve-session.js +6 -5
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -2
- package/dist/server/rpc/handlers/load-model/resolve.js +9 -6
- package/dist/server/rpc/handlers/load-model/types.d.ts +24 -0
- package/dist/server/rpc/handlers/rag.js +133 -15
- package/dist/server/rpc/handlers/upscale-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/upscale-stream.js +4 -0
- package/dist/server/utils/completion-normalizer.js +8 -0
- package/dist/server/utils/tools/dialect.js +4 -0
- package/dist/server/utils/tools/parser.js +16 -1
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +4 -0
- package/dist/server/utils/tools/parsers/gemma4native.js +60 -0
- package/dist/server/utils/tools/parsers/qwen35.d.ts +4 -0
- package/dist/server/utils/tools/parsers/qwen35.js +120 -0
- package/dist/utils/aggregate-events.d.ts +9 -0
- package/dist/utils/aggregate-events.js +18 -3
- package/dist/utils/decorate-promise.d.ts +34 -0
- package/dist/utils/decorate-promise.js +35 -0
- package/dist/utils/errors-client.d.ts +3 -0
- package/dist/utils/errors-client.js +5 -0
- package/dist/utils/errors-server.d.ts +85 -0
- package/dist/utils/errors-server.js +97 -0
- package/package.json +20 -15
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type LlmConfig } from "../../../../schemas/index";
|
|
2
|
+
/**
|
|
3
|
+
* Converts an LlmConfig into the flat string-keyed map the C++ addon expects.
|
|
4
|
+
*
|
|
5
|
+
* JS-only fields excluded from the output (must NOT be forwarded to the addon):
|
|
6
|
+
* - modelType (schema discriminant, meaningless at C++ level)
|
|
7
|
+
* - system_prompt (JS-side history seeding only; C++ removed --system-prompt in 8189)
|
|
8
|
+
*/
|
|
9
|
+
export declare function transformLlmConfig(llmConfig: LlmConfig): Record<string, string>;
|
|
10
|
+
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TOOLS_MODE } from "../../../../schemas/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Converts an LlmConfig into the flat string-keyed map the C++ addon expects.
|
|
4
|
+
*
|
|
5
|
+
* JS-only fields excluded from the output (must NOT be forwarded to the addon):
|
|
6
|
+
* - modelType (schema discriminant, meaningless at C++ level)
|
|
7
|
+
* - system_prompt (JS-side history seeding only; C++ removed --system-prompt in 8189)
|
|
8
|
+
*/
|
|
9
|
+
export function transformLlmConfig(llmConfig) {
|
|
10
|
+
const transformed = JSON.parse(JSON.stringify(llmConfig, (key, v) => key === "modelType" || key === "system_prompt"
|
|
11
|
+
? undefined
|
|
12
|
+
: key === "stop_sequences"
|
|
13
|
+
? Array.isArray(v)
|
|
14
|
+
? v.join(", ")
|
|
15
|
+
: v
|
|
16
|
+
: typeof v === "number" || typeof v === "boolean"
|
|
17
|
+
? String(v)
|
|
18
|
+
: v).replace(/"([a-z][A-Za-z]*)":/g, (_, key) => `"${key.replace(/[A-Z]/g, (l) => `_${l.toLowerCase()}`)}":`));
|
|
19
|
+
if ("stop_sequences" in transformed) {
|
|
20
|
+
transformed["reverse_prompt"] = transformed["stop_sequences"];
|
|
21
|
+
delete transformed["stop_sequences"];
|
|
22
|
+
}
|
|
23
|
+
if ("opencl_cache_dir" in transformed) {
|
|
24
|
+
transformed["openclCacheDir"] = transformed["opencl_cache_dir"];
|
|
25
|
+
delete transformed["opencl_cache_dir"];
|
|
26
|
+
}
|
|
27
|
+
if ("tools_mode" in transformed) {
|
|
28
|
+
if (transformed["tools_mode"] === TOOLS_MODE.dynamic) {
|
|
29
|
+
transformed["tools_compact"] = "true";
|
|
30
|
+
}
|
|
31
|
+
delete transformed["tools_mode"];
|
|
32
|
+
}
|
|
33
|
+
return transformed;
|
|
34
|
+
}
|
|
@@ -31,6 +31,12 @@ export declare const embeddingsPlugin: {
|
|
|
31
31
|
integrated: "integrated";
|
|
32
32
|
dedicated: "dedicated";
|
|
33
33
|
}>]>>;
|
|
34
|
+
splitMode: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
35
|
+
none: "none";
|
|
36
|
+
layer: "layer";
|
|
37
|
+
row: "row";
|
|
38
|
+
}>>;
|
|
39
|
+
tensorSplit: import("zod").ZodOptional<import("zod").ZodString>;
|
|
34
40
|
verbosity: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>, import("zod").ZodLiteral<3>]>>;
|
|
35
41
|
openclCacheDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
42
|
}, import("zod/v4/core").$strip>;
|
|
@@ -40,6 +46,7 @@ export declare const embeddingsPlugin: {
|
|
|
40
46
|
modelId: import("zod").ZodString;
|
|
41
47
|
text: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
42
48
|
type: import("zod").ZodLiteral<"embed">;
|
|
49
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
50
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
44
51
|
type: import("zod").ZodLiteral<"embed">;
|
|
45
52
|
success: import("zod").ZodBoolean;
|
|
@@ -29,6 +29,12 @@ function transformEmbedConfig(embedConfig) {
|
|
|
29
29
|
? `${embedConfig.mainGpu}`
|
|
30
30
|
: embedConfig.mainGpu;
|
|
31
31
|
}
|
|
32
|
+
if (embedConfig.splitMode) {
|
|
33
|
+
config["split-mode"] = embedConfig.splitMode;
|
|
34
|
+
}
|
|
35
|
+
if (embedConfig.tensorSplit) {
|
|
36
|
+
config["tensor-split"] = embedConfig.tensorSplit;
|
|
37
|
+
}
|
|
32
38
|
if (typeof embedConfig.verbosity === "number") {
|
|
33
39
|
config.verbosity = `${embedConfig.verbosity}`;
|
|
34
40
|
}
|
|
@@ -65,11 +71,14 @@ export const embeddingsPlugin = definePlugin({
|
|
|
65
71
|
requestSchema: embedRequestSchema,
|
|
66
72
|
responseSchema: embedResponseSchema,
|
|
67
73
|
streaming: false,
|
|
74
|
+
// Model-wide hard cancel via `addon.cancel()` on the llama.cpp
|
|
75
|
+
// embedding addon. Compute is interrupted when fired.
|
|
76
|
+
cancel: { scope: "model", hard: true },
|
|
68
77
|
handler: async function (request) {
|
|
69
78
|
const embedResult = await embed({
|
|
70
79
|
modelId: request.modelId,
|
|
71
80
|
text: request.text,
|
|
72
|
-
});
|
|
81
|
+
}, request.requestId);
|
|
73
82
|
return forwardModelExecution({
|
|
74
83
|
type: "embed",
|
|
75
84
|
success: true,
|
|
@@ -137,6 +137,9 @@ export declare const nmtPlugin: {
|
|
|
137
137
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
138
138
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
139
139
|
embeddings: "embeddings";
|
|
140
|
+
diffusion: "diffusion";
|
|
141
|
+
tts: "tts";
|
|
142
|
+
ocr: "ocr";
|
|
140
143
|
"llamacpp-completion": "llamacpp-completion";
|
|
141
144
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
142
145
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -149,9 +152,6 @@ export declare const nmtPlugin: {
|
|
|
149
152
|
whisper: "whisper";
|
|
150
153
|
nmt: "nmt";
|
|
151
154
|
parakeet: "parakeet";
|
|
152
|
-
tts: "tts";
|
|
153
|
-
ocr: "ocr";
|
|
154
|
-
diffusion: "diffusion";
|
|
155
155
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
156
156
|
}, import("zod/v4/core").$strip>]>>;
|
|
157
157
|
dstVocabSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -167,6 +167,9 @@ export declare const nmtPlugin: {
|
|
|
167
167
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
168
168
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
169
169
|
embeddings: "embeddings";
|
|
170
|
+
diffusion: "diffusion";
|
|
171
|
+
tts: "tts";
|
|
172
|
+
ocr: "ocr";
|
|
170
173
|
"llamacpp-completion": "llamacpp-completion";
|
|
171
174
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
172
175
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -179,9 +182,6 @@ export declare const nmtPlugin: {
|
|
|
179
182
|
whisper: "whisper";
|
|
180
183
|
nmt: "nmt";
|
|
181
184
|
parakeet: "parakeet";
|
|
182
|
-
tts: "tts";
|
|
183
|
-
ocr: "ocr";
|
|
184
|
-
diffusion: "diffusion";
|
|
185
185
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
186
186
|
}, import("zod/v4/core").$strip>]>>;
|
|
187
187
|
normalize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -210,6 +210,9 @@ export declare const nmtPlugin: {
|
|
|
210
210
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
211
211
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
212
212
|
embeddings: "embeddings";
|
|
213
|
+
diffusion: "diffusion";
|
|
214
|
+
tts: "tts";
|
|
215
|
+
ocr: "ocr";
|
|
213
216
|
"llamacpp-completion": "llamacpp-completion";
|
|
214
217
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
215
218
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -222,9 +225,6 @@ export declare const nmtPlugin: {
|
|
|
222
225
|
whisper: "whisper";
|
|
223
226
|
nmt: "nmt";
|
|
224
227
|
parakeet: "parakeet";
|
|
225
|
-
tts: "tts";
|
|
226
|
-
ocr: "ocr";
|
|
227
|
-
diffusion: "diffusion";
|
|
228
228
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
229
229
|
}, import("zod/v4/core").$strip>]>;
|
|
230
230
|
srcVocabSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -240,6 +240,9 @@ export declare const nmtPlugin: {
|
|
|
240
240
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
241
241
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
242
242
|
embeddings: "embeddings";
|
|
243
|
+
diffusion: "diffusion";
|
|
244
|
+
tts: "tts";
|
|
245
|
+
ocr: "ocr";
|
|
243
246
|
"llamacpp-completion": "llamacpp-completion";
|
|
244
247
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
245
248
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -252,9 +255,6 @@ export declare const nmtPlugin: {
|
|
|
252
255
|
whisper: "whisper";
|
|
253
256
|
nmt: "nmt";
|
|
254
257
|
parakeet: "parakeet";
|
|
255
|
-
tts: "tts";
|
|
256
|
-
ocr: "ocr";
|
|
257
|
-
diffusion: "diffusion";
|
|
258
258
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
259
259
|
}, import("zod/v4/core").$strip>]>>;
|
|
260
260
|
dstVocabSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -270,6 +270,9 @@ export declare const nmtPlugin: {
|
|
|
270
270
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
271
271
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
272
272
|
embeddings: "embeddings";
|
|
273
|
+
diffusion: "diffusion";
|
|
274
|
+
tts: "tts";
|
|
275
|
+
ocr: "ocr";
|
|
273
276
|
"llamacpp-completion": "llamacpp-completion";
|
|
274
277
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
275
278
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -282,9 +285,6 @@ export declare const nmtPlugin: {
|
|
|
282
285
|
whisper: "whisper";
|
|
283
286
|
nmt: "nmt";
|
|
284
287
|
parakeet: "parakeet";
|
|
285
|
-
tts: "tts";
|
|
286
|
-
ocr: "ocr";
|
|
287
|
-
diffusion: "diffusion";
|
|
288
288
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
289
289
|
}, import("zod/v4/core").$strip>]>>;
|
|
290
290
|
normalize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -371,6 +371,7 @@ export declare const nmtPlugin: {
|
|
|
371
371
|
nmt: "nmt";
|
|
372
372
|
}>;
|
|
373
373
|
type: import("zod").ZodLiteral<"translate">;
|
|
374
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
374
375
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
375
376
|
modelId: import("zod").ZodString;
|
|
376
377
|
text: import("zod").ZodString;
|
|
@@ -383,6 +384,7 @@ export declare const nmtPlugin: {
|
|
|
383
384
|
to: import("zod").ZodString;
|
|
384
385
|
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
385
386
|
type: import("zod").ZodLiteral<"translate">;
|
|
387
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
386
388
|
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
387
389
|
type: import("zod").ZodLiteral<"translate">;
|
|
388
390
|
token: import("zod").ZodString;
|
|
@@ -108,8 +108,12 @@ export const nmtPlugin = definePlugin({
|
|
|
108
108
|
requestSchema: translateRequestSchema,
|
|
109
109
|
responseSchema: translateResponseSchema,
|
|
110
110
|
streaming: true,
|
|
111
|
+
// nmtcpp does not expose a cancel surface today — SDK falls
|
|
112
|
+
// back to soft-cancel (stop yielding, drop result, skip
|
|
113
|
+
// post-processing; the C++ work runs to completion).
|
|
114
|
+
cancel: { scope: "none" },
|
|
111
115
|
handler: async function* (request) {
|
|
112
|
-
const stream = translate(request);
|
|
116
|
+
const stream = translate(request, request.requestId);
|
|
113
117
|
try {
|
|
114
118
|
let result = await stream.next();
|
|
115
119
|
while (!result.done) {
|
|
@@ -34,6 +34,9 @@ export declare const ocrPlugin: {
|
|
|
34
34
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
35
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
36
36
|
embeddings: "embeddings";
|
|
37
|
+
diffusion: "diffusion";
|
|
38
|
+
tts: "tts";
|
|
39
|
+
ocr: "ocr";
|
|
37
40
|
"llamacpp-completion": "llamacpp-completion";
|
|
38
41
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
39
42
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -46,9 +49,6 @@ export declare const ocrPlugin: {
|
|
|
46
49
|
whisper: "whisper";
|
|
47
50
|
nmt: "nmt";
|
|
48
51
|
parakeet: "parakeet";
|
|
49
|
-
tts: "tts";
|
|
50
|
-
ocr: "ocr";
|
|
51
|
-
diffusion: "diffusion";
|
|
52
52
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
53
53
|
}, import("zod/v4/core").$strip>]>>;
|
|
54
54
|
}, import("zod/v4/core").$strip>;
|
|
@@ -89,6 +89,9 @@ export const ocrPlugin = definePlugin({
|
|
|
89
89
|
requestSchema: ocrStreamRequestSchema,
|
|
90
90
|
responseSchema: ocrStreamResponseSchema,
|
|
91
91
|
streaming: true,
|
|
92
|
+
// ONNX OCR does not expose a cancel surface — SDK falls back
|
|
93
|
+
// to soft-cancel.
|
|
94
|
+
cancel: { scope: "none" },
|
|
92
95
|
handler: async function* (request) {
|
|
93
96
|
const stream = ocr({
|
|
94
97
|
modelId: request.modelId,
|
|
@@ -24,6 +24,9 @@ export declare const ttsPlugin: {
|
|
|
24
24
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
25
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
26
26
|
embeddings: "embeddings";
|
|
27
|
+
diffusion: "diffusion";
|
|
28
|
+
tts: "tts";
|
|
29
|
+
ocr: "ocr";
|
|
27
30
|
"llamacpp-completion": "llamacpp-completion";
|
|
28
31
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
29
32
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -36,9 +39,6 @@ export declare const ttsPlugin: {
|
|
|
36
39
|
whisper: "whisper";
|
|
37
40
|
nmt: "nmt";
|
|
38
41
|
parakeet: "parakeet";
|
|
39
|
-
tts: "tts";
|
|
40
|
-
ocr: "ocr";
|
|
41
|
-
diffusion: "diffusion";
|
|
42
42
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
43
43
|
}, import("zod/v4/core").$strip>]>;
|
|
44
44
|
ttsSpeechEncoderSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -54,6 +54,9 @@ export declare const ttsPlugin: {
|
|
|
54
54
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
55
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
56
56
|
embeddings: "embeddings";
|
|
57
|
+
diffusion: "diffusion";
|
|
58
|
+
tts: "tts";
|
|
59
|
+
ocr: "ocr";
|
|
57
60
|
"llamacpp-completion": "llamacpp-completion";
|
|
58
61
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
59
62
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -66,9 +69,6 @@ export declare const ttsPlugin: {
|
|
|
66
69
|
whisper: "whisper";
|
|
67
70
|
nmt: "nmt";
|
|
68
71
|
parakeet: "parakeet";
|
|
69
|
-
tts: "tts";
|
|
70
|
-
ocr: "ocr";
|
|
71
|
-
diffusion: "diffusion";
|
|
72
72
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
73
73
|
}, import("zod/v4/core").$strip>]>;
|
|
74
74
|
ttsEmbedTokensSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -84,6 +84,9 @@ export declare const ttsPlugin: {
|
|
|
84
84
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
85
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
86
86
|
embeddings: "embeddings";
|
|
87
|
+
diffusion: "diffusion";
|
|
88
|
+
tts: "tts";
|
|
89
|
+
ocr: "ocr";
|
|
87
90
|
"llamacpp-completion": "llamacpp-completion";
|
|
88
91
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
89
92
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -96,9 +99,6 @@ export declare const ttsPlugin: {
|
|
|
96
99
|
whisper: "whisper";
|
|
97
100
|
nmt: "nmt";
|
|
98
101
|
parakeet: "parakeet";
|
|
99
|
-
tts: "tts";
|
|
100
|
-
ocr: "ocr";
|
|
101
|
-
diffusion: "diffusion";
|
|
102
102
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
103
103
|
}, import("zod/v4/core").$strip>]>;
|
|
104
104
|
ttsConditionalDecoderSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -114,6 +114,9 @@ export declare const ttsPlugin: {
|
|
|
114
114
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
115
115
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
116
116
|
embeddings: "embeddings";
|
|
117
|
+
diffusion: "diffusion";
|
|
118
|
+
tts: "tts";
|
|
119
|
+
ocr: "ocr";
|
|
117
120
|
"llamacpp-completion": "llamacpp-completion";
|
|
118
121
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
119
122
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -126,9 +129,6 @@ export declare const ttsPlugin: {
|
|
|
126
129
|
whisper: "whisper";
|
|
127
130
|
nmt: "nmt";
|
|
128
131
|
parakeet: "parakeet";
|
|
129
|
-
tts: "tts";
|
|
130
|
-
ocr: "ocr";
|
|
131
|
-
diffusion: "diffusion";
|
|
132
132
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
133
133
|
}, import("zod/v4/core").$strip>]>;
|
|
134
134
|
ttsLanguageModelSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -144,6 +144,9 @@ export declare const ttsPlugin: {
|
|
|
144
144
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
145
145
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
146
146
|
embeddings: "embeddings";
|
|
147
|
+
diffusion: "diffusion";
|
|
148
|
+
tts: "tts";
|
|
149
|
+
ocr: "ocr";
|
|
147
150
|
"llamacpp-completion": "llamacpp-completion";
|
|
148
151
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
149
152
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -156,9 +159,6 @@ export declare const ttsPlugin: {
|
|
|
156
159
|
whisper: "whisper";
|
|
157
160
|
nmt: "nmt";
|
|
158
161
|
parakeet: "parakeet";
|
|
159
|
-
tts: "tts";
|
|
160
|
-
ocr: "ocr";
|
|
161
|
-
diffusion: "diffusion";
|
|
162
162
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
163
163
|
}, import("zod/v4/core").$strip>]>;
|
|
164
164
|
referenceAudioSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -174,6 +174,9 @@ export declare const ttsPlugin: {
|
|
|
174
174
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
175
175
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
176
176
|
embeddings: "embeddings";
|
|
177
|
+
diffusion: "diffusion";
|
|
178
|
+
tts: "tts";
|
|
179
|
+
ocr: "ocr";
|
|
177
180
|
"llamacpp-completion": "llamacpp-completion";
|
|
178
181
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
179
182
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -186,9 +189,6 @@ export declare const ttsPlugin: {
|
|
|
186
189
|
whisper: "whisper";
|
|
187
190
|
nmt: "nmt";
|
|
188
191
|
parakeet: "parakeet";
|
|
189
|
-
tts: "tts";
|
|
190
|
-
ocr: "ocr";
|
|
191
|
-
diffusion: "diffusion";
|
|
192
192
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
193
193
|
}, import("zod/v4/core").$strip>]>;
|
|
194
194
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -215,6 +215,9 @@ export declare const ttsPlugin: {
|
|
|
215
215
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
216
216
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
217
217
|
embeddings: "embeddings";
|
|
218
|
+
diffusion: "diffusion";
|
|
219
|
+
tts: "tts";
|
|
220
|
+
ocr: "ocr";
|
|
218
221
|
"llamacpp-completion": "llamacpp-completion";
|
|
219
222
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
220
223
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -227,9 +230,6 @@ export declare const ttsPlugin: {
|
|
|
227
230
|
whisper: "whisper";
|
|
228
231
|
nmt: "nmt";
|
|
229
232
|
parakeet: "parakeet";
|
|
230
|
-
tts: "tts";
|
|
231
|
-
ocr: "ocr";
|
|
232
|
-
diffusion: "diffusion";
|
|
233
233
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
234
234
|
}, import("zod/v4/core").$strip>]>;
|
|
235
235
|
ttsDurationPredictorSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -245,6 +245,9 @@ export declare const ttsPlugin: {
|
|
|
245
245
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
246
246
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
247
247
|
embeddings: "embeddings";
|
|
248
|
+
diffusion: "diffusion";
|
|
249
|
+
tts: "tts";
|
|
250
|
+
ocr: "ocr";
|
|
248
251
|
"llamacpp-completion": "llamacpp-completion";
|
|
249
252
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
250
253
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -257,9 +260,6 @@ export declare const ttsPlugin: {
|
|
|
257
260
|
whisper: "whisper";
|
|
258
261
|
nmt: "nmt";
|
|
259
262
|
parakeet: "parakeet";
|
|
260
|
-
tts: "tts";
|
|
261
|
-
ocr: "ocr";
|
|
262
|
-
diffusion: "diffusion";
|
|
263
263
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
264
264
|
}, import("zod/v4/core").$strip>]>;
|
|
265
265
|
ttsVectorEstimatorSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -275,6 +275,9 @@ export declare const ttsPlugin: {
|
|
|
275
275
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
276
276
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
277
277
|
embeddings: "embeddings";
|
|
278
|
+
diffusion: "diffusion";
|
|
279
|
+
tts: "tts";
|
|
280
|
+
ocr: "ocr";
|
|
278
281
|
"llamacpp-completion": "llamacpp-completion";
|
|
279
282
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
280
283
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -287,9 +290,6 @@ export declare const ttsPlugin: {
|
|
|
287
290
|
whisper: "whisper";
|
|
288
291
|
nmt: "nmt";
|
|
289
292
|
parakeet: "parakeet";
|
|
290
|
-
tts: "tts";
|
|
291
|
-
ocr: "ocr";
|
|
292
|
-
diffusion: "diffusion";
|
|
293
293
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
294
294
|
}, import("zod/v4/core").$strip>]>;
|
|
295
295
|
ttsVocoderSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -305,6 +305,9 @@ export declare const ttsPlugin: {
|
|
|
305
305
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
306
306
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
307
307
|
embeddings: "embeddings";
|
|
308
|
+
diffusion: "diffusion";
|
|
309
|
+
tts: "tts";
|
|
310
|
+
ocr: "ocr";
|
|
308
311
|
"llamacpp-completion": "llamacpp-completion";
|
|
309
312
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
310
313
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -317,9 +320,6 @@ export declare const ttsPlugin: {
|
|
|
317
320
|
whisper: "whisper";
|
|
318
321
|
nmt: "nmt";
|
|
319
322
|
parakeet: "parakeet";
|
|
320
|
-
tts: "tts";
|
|
321
|
-
ocr: "ocr";
|
|
322
|
-
diffusion: "diffusion";
|
|
323
323
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
324
324
|
}, import("zod/v4/core").$strip>]>;
|
|
325
325
|
ttsUnicodeIndexerSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -335,6 +335,9 @@ export declare const ttsPlugin: {
|
|
|
335
335
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
336
336
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
337
337
|
embeddings: "embeddings";
|
|
338
|
+
diffusion: "diffusion";
|
|
339
|
+
tts: "tts";
|
|
340
|
+
ocr: "ocr";
|
|
338
341
|
"llamacpp-completion": "llamacpp-completion";
|
|
339
342
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
340
343
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -347,9 +350,6 @@ export declare const ttsPlugin: {
|
|
|
347
350
|
whisper: "whisper";
|
|
348
351
|
nmt: "nmt";
|
|
349
352
|
parakeet: "parakeet";
|
|
350
|
-
tts: "tts";
|
|
351
|
-
ocr: "ocr";
|
|
352
|
-
diffusion: "diffusion";
|
|
353
353
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
354
354
|
}, import("zod/v4/core").$strip>]>;
|
|
355
355
|
ttsTtsConfigSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -365,6 +365,9 @@ export declare const ttsPlugin: {
|
|
|
365
365
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
366
366
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
367
367
|
embeddings: "embeddings";
|
|
368
|
+
diffusion: "diffusion";
|
|
369
|
+
tts: "tts";
|
|
370
|
+
ocr: "ocr";
|
|
368
371
|
"llamacpp-completion": "llamacpp-completion";
|
|
369
372
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
370
373
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -377,9 +380,6 @@ export declare const ttsPlugin: {
|
|
|
377
380
|
whisper: "whisper";
|
|
378
381
|
nmt: "nmt";
|
|
379
382
|
parakeet: "parakeet";
|
|
380
|
-
tts: "tts";
|
|
381
|
-
ocr: "ocr";
|
|
382
|
-
diffusion: "diffusion";
|
|
383
383
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
384
384
|
}, import("zod/v4/core").$strip>]>;
|
|
385
385
|
ttsVoiceStyleSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -395,6 +395,9 @@ export declare const ttsPlugin: {
|
|
|
395
395
|
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
396
396
|
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
397
397
|
embeddings: "embeddings";
|
|
398
|
+
diffusion: "diffusion";
|
|
399
|
+
tts: "tts";
|
|
400
|
+
ocr: "ocr";
|
|
398
401
|
"llamacpp-completion": "llamacpp-completion";
|
|
399
402
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
400
403
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -407,9 +410,6 @@ export declare const ttsPlugin: {
|
|
|
407
410
|
whisper: "whisper";
|
|
408
411
|
nmt: "nmt";
|
|
409
412
|
parakeet: "parakeet";
|
|
410
|
-
tts: "tts";
|
|
411
|
-
ocr: "ocr";
|
|
412
|
-
diffusion: "diffusion";
|
|
413
413
|
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
414
414
|
}, import("zod/v4/core").$strip>]>;
|
|
415
415
|
}, import("zod/v4/core").$strip>]>;
|
|
@@ -189,6 +189,9 @@ export const ttsPlugin = definePlugin({
|
|
|
189
189
|
requestSchema: ttsRequestSchema,
|
|
190
190
|
responseSchema: ttsResponseSchema,
|
|
191
191
|
streaming: true,
|
|
192
|
+
// ONNX TTS does not expose a cancel surface — SDK falls back
|
|
193
|
+
// to soft-cancel.
|
|
194
|
+
cancel: { scope: "none" },
|
|
192
195
|
handler: async function* (request) {
|
|
193
196
|
const stream = textToSpeech(request);
|
|
194
197
|
try {
|
|
@@ -226,6 +229,9 @@ export const ttsPlugin = definePlugin({
|
|
|
226
229
|
responseSchema: textToSpeechStreamResponseSchema,
|
|
227
230
|
streaming: true,
|
|
228
231
|
duplex: true,
|
|
232
|
+
// ONNX TTS does not expose a cancel surface — SDK falls back
|
|
233
|
+
// to soft-cancel.
|
|
234
|
+
cancel: { scope: "none" },
|
|
229
235
|
handler: async function* (request, inputStream) {
|
|
230
236
|
const stream = textToSpeechStream(request, inputStream);
|
|
231
237
|
try {
|