@qvac/sdk 0.10.2 → 0.12.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 +1455 -29
- package/README.md +2 -0
- package/dist/client/api/cancel.d.ts +24 -32
- package/dist/client/api/cancel.js +58 -31
- package/dist/client/api/classify.d.ts +23 -0
- package/dist/client/api/classify.js +43 -0
- 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 +5 -0
- package/dist/client/api/index.js +5 -0
- package/dist/client/api/load-model.d.ts +12 -4
- package/dist/client/api/load-model.js +49 -2
- package/dist/client/api/rag.d.ts +9 -3
- package/dist/client/api/rag.js +23 -3
- package/dist/client/api/transcribe.d.ts +23 -8
- package/dist/client/api/transcribe.js +69 -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/api/video.d.ts +64 -0
- package/dist/client/api/video.js +147 -0
- package/dist/client/api/vla-helpers.d.ts +45 -0
- package/dist/client/api/vla-helpers.js +130 -0
- package/dist/client/api/vla.d.ts +65 -0
- package/dist/client/api/vla.js +109 -0
- package/dist/client/config-loader/resolve-config.node.d.ts +16 -0
- package/dist/client/config-loader/resolve-config.node.js +77 -23
- package/dist/client/plugins-factory.d.ts +8 -0
- package/dist/client/plugins-factory.js +10 -0
- package/dist/client/rpc/bare-client.js +62 -66
- package/dist/client/rpc/ensure-worker-ready.d.ts +9 -0
- package/dist/client/rpc/ensure-worker-ready.js +17 -0
- package/dist/client/rpc/expo-rpc-client.js +2 -1
- package/dist/client/rpc/node-rpc-client.js +22 -8
- 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 +105 -0
- package/dist/commands/bundle/bare-pack.d.ts +13 -0
- package/dist/commands/bundle/bare-pack.js +54 -0
- package/dist/commands/bundle/constants.d.ts +7 -0
- package/dist/commands/bundle/constants.js +23 -0
- package/dist/commands/bundle/entry-gen.d.ts +2 -0
- package/dist/commands/bundle/entry-gen.js +48 -0
- package/dist/commands/bundle/index.d.ts +20 -0
- package/dist/commands/bundle/index.js +141 -0
- package/dist/commands/bundle/manifest.d.ts +21 -0
- package/dist/commands/bundle/manifest.js +193 -0
- package/dist/commands/bundle/plugins.d.ts +9 -0
- package/dist/commands/bundle/plugins.js +51 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/verify/abi.d.ts +52 -0
- package/dist/commands/verify/abi.js +125 -0
- package/dist/commands/verify/addon-source.d.ts +43 -0
- package/dist/commands/verify/addon-source.js +75 -0
- package/dist/commands/verify/bundle-source.d.ts +12 -0
- package/dist/commands/verify/bundle-source.js +53 -0
- package/dist/commands/verify/index.d.ts +59 -0
- package/dist/commands/verify/index.js +371 -0
- package/dist/commands/verify/node-modules-source.d.ts +11 -0
- package/dist/commands/verify/node-modules-source.js +76 -0
- package/dist/commands/verify/prebuilds.d.ts +15 -0
- package/dist/commands/verify/prebuilds.js +39 -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/classification/classify-image.d.ts +2 -0
- package/dist/examples/classification/classify-image.js +23 -0
- package/dist/examples/diffusion-esrgan-upscale.d.ts +2 -0
- package/dist/examples/diffusion-esrgan-upscale.js +78 -0
- package/dist/examples/diffusion-txt2vid.d.ts +2 -0
- package/dist/examples/diffusion-txt2vid.js +81 -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/plugins.js +3 -7
- 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 +73 -0
- package/dist/examples/tools/llamacpp-tools-qwen35.d.ts +2 -0
- package/dist/examples/tools/llamacpp-tools-qwen35.js +69 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +18 -12
- package/dist/examples/transcription/parakeet-microphone-record.js +7 -12
- package/dist/examples/transcription/parakeet-microphone-stream.d.ts +2 -0
- package/dist/examples/transcription/parakeet-microphone-stream.js +79 -0
- package/dist/examples/transcription/parakeet-sortformer-streaming.d.ts +2 -0
- package/dist/examples/transcription/parakeet-sortformer-streaming.js +121 -0
- package/dist/examples/transcription/parakeet-sortformer.js +58 -55
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +18 -15
- package/dist/examples/transcription/whispercpp-microphone-conversation.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +107 -0
- package/dist/examples/tts/chatterbox.js +7 -16
- package/dist/examples/tts/llm-to-tts-streaming.js +3 -10
- package/dist/examples/tts/supertonic-multilingual.js +4 -12
- package/dist/examples/tts/supertonic.js +5 -12
- package/dist/examples/vla-smolvla.d.ts +2 -0
- package/dist/examples/vla-smolvla.js +75 -0
- package/dist/examples/voice-assistant/voice-assistant.js +3 -10
- package/dist/expo/plugins/find-in-ancestor-node-modules.d.ts +14 -0
- package/dist/expo/plugins/find-in-ancestor-node-modules.js +24 -0
- package/dist/expo/plugins/get-project-root.d.ts +22 -0
- package/dist/expo/plugins/get-project-root.js +23 -0
- package/dist/expo/plugins/index.d.ts +4 -0
- package/dist/expo/plugins/index.js +4 -0
- package/dist/expo/plugins/resolve-sdk-package-dir.d.ts +9 -2
- package/dist/expo/plugins/resolve-sdk-package-dir.js +38 -11
- package/dist/expo/plugins/withDeviceInfo.js +2 -1
- package/dist/expo/plugins/withMobileBundle.d.ts +5 -4
- package/dist/expo/plugins/withMobileBundle.js +42 -58
- package/dist/index.d.ts +6 -2
- package/dist/index.js +23 -2
- package/dist/models/registry/models.d.ts +3725 -514
- package/dist/models/registry/models.js +7269 -3910
- package/dist/models/update-models/naming.js +22 -8
- package/dist/pear/pre.d.ts +3 -0
- package/dist/pear/pre.js +9 -2
- package/dist/schemas/cancel.d.ts +172 -28
- package/dist/schemas/cancel.js +120 -19
- package/dist/schemas/classification.d.ts +53 -0
- package/dist/schemas/classification.js +33 -0
- package/dist/schemas/common.d.ts +860 -1379
- package/dist/schemas/common.js +8 -1
- package/dist/schemas/completion-event.d.ts +17 -0
- package/dist/schemas/completion-event.js +12 -1
- package/dist/schemas/completion-stream.d.ts +16 -1
- package/dist/schemas/completion-stream.js +25 -7
- package/dist/schemas/download-asset.d.ts +25 -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/engine-addon-map.d.ts +3 -0
- package/dist/schemas/engine-addon-map.js +18 -5
- 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 +10 -6
- package/dist/schemas/get-model-info.js +2 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/llamacpp-config.d.ts +64 -8
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +4644 -8605
- package/dist/schemas/load-model.js +90 -7
- package/dist/schemas/model-src-utils.d.ts +34 -14
- package/dist/schemas/model-types.d.ts +54 -14
- package/dist/schemas/model-types.js +28 -5
- package/dist/schemas/ocr.d.ts +8 -3
- package/dist/schemas/plugin.d.ts +60 -6
- package/dist/schemas/plugin.js +31 -5
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +17 -9
- package/dist/schemas/registry.d.ts +74 -30
- package/dist/schemas/registry.js +5 -0
- package/dist/schemas/reload-config.d.ts +34 -14
- package/dist/schemas/sdcpp-config.d.ts +445 -16
- package/dist/schemas/sdcpp-config.js +387 -26
- package/dist/schemas/sdk-config.d.ts +2431 -2723
- package/dist/schemas/sdk-config.js +16 -1
- package/dist/schemas/sdk-errors-client.d.ts +6 -0
- package/dist/schemas/sdk-errors-client.js +31 -1
- package/dist/schemas/sdk-errors-server.d.ts +8 -1
- package/dist/schemas/sdk-errors-server.js +45 -5
- package/dist/schemas/text-to-speech.d.ts +81 -698
- package/dist/schemas/text-to-speech.js +46 -19
- package/dist/schemas/transcription-config.d.ts +40 -229
- package/dist/schemas/transcription-config.js +76 -15
- package/dist/schemas/transcription.d.ts +108 -2
- package/dist/schemas/transcription.js +81 -0
- package/dist/schemas/translate.d.ts +2 -0
- package/dist/schemas/translate.js +13 -2
- package/dist/schemas/translation-config.d.ts +90 -40
- package/dist/schemas/unload-model.d.ts +2 -1
- package/dist/schemas/unload-model.js +4 -1
- package/dist/schemas/vla.d.ts +87 -0
- package/dist/schemas/vla.js +108 -0
- package/dist/scripts/run-unit-tests.js +22 -3
- 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 +11 -5
- package/dist/server/bare/ops/transcribe.js +230 -50
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +197 -88
- package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +6 -0
- package/dist/server/bare/plugins/ggml-classification/ops/classify.js +30 -0
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +32 -0
- package/dist/server/bare/plugins/ggml-classification/plugin.js +55 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.d.ts +3 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.js +12 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +3 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +75 -0
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +54 -0
- package/dist/server/bare/plugins/ggml-vla/plugin.js +57 -0
- package/dist/server/bare/plugins/index.d.ts +3 -1
- package/dist/server/bare/plugins/index.js +3 -1
- 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 +173 -172
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.d.ts +29 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +65 -0
- 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 +36 -3
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +183 -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 +42 -15
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +5 -1
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +8 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +3 -0
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +73 -244
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +68 -96
- 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/ops/video.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +199 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +288 -15
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +150 -7
- package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech-stream.js +2 -15
- package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech.js +2 -1
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +75 -0
- package/dist/server/bare/plugins/tts-ggml/plugin.js +189 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +47 -3
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +61 -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/registry/model-config-utils.js +7 -0
- 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/runtime-lifecycle.js +9 -9
- package/dist/server/bare/types/addon-responses.d.ts +12 -1
- package/dist/server/env.js +4 -1
- package/dist/server/plugins/index.d.ts +1 -1
- package/dist/server/plugins/index.js +1 -1
- package/dist/server/plugins/registry.d.ts +1 -0
- package/dist/server/plugins/registry.js +5 -0
- package/dist/server/rpc/handler-registry.js +30 -7
- package/dist/server/rpc/handler-selection.d.ts +9 -0
- package/dist/server/rpc/handler-selection.js +14 -0
- package/dist/server/rpc/handler-utils.js +5 -13
- 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/classify.d.ts +3 -0
- package/dist/server/rpc/handlers/classify.js +4 -0
- 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 +4 -0
- package/dist/server/rpc/handlers/index.js +4 -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 +216 -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 +18 -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/rpc/handlers/video-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/video-stream.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.js +23 -0
- package/dist/server/utils/completion-normalizer.js +8 -0
- package/dist/server/utils/config-transform.js +1 -1
- 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/server/worker.js +14 -11
- 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 +18 -0
- package/dist/utils/errors-client.js +31 -0
- package/dist/utils/errors-server.d.ts +115 -2
- package/dist/utils/errors-server.js +148 -3
- package/package.json +68 -77
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +0 -490
- package/dist/server/bare/plugins/onnx-tts/plugin.js +0 -266
- package/dist/server/bare/plugins/onnx-tts/wav-helper.d.ts +0 -14
- package/dist/server/bare/plugins/onnx-tts/wav-helper.js +0 -107
- /package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech-stream.d.ts +0 -0
- /package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech.d.ts +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { llmConfigBaseSchema, embedConfigBaseSchema, } from "./llamacpp-config.js";
|
|
3
|
-
import { whisperConfigSchema,
|
|
3
|
+
import { whisperConfigSchema, parakeetLoadConfigSchema, } from "./transcription-config.js";
|
|
4
4
|
import { delegateSchema } from "./delegate.js";
|
|
5
5
|
import { nmtConfigSchema } from "./translation-config.js";
|
|
6
6
|
import { ttsConfigSchema } from "./text-to-speech.js";
|
|
7
7
|
import { ocrConfigSchema } from "./ocr.js";
|
|
8
8
|
import { modelSrcInputSchema, modelInputToSrcSchema, modelInputToNameSchema, } from "./model-src-utils.js";
|
|
9
|
-
import { llmModelTypeSchema, whisperModelTypeSchema, parakeetModelTypeSchema, embeddingsModelTypeSchema, nmtModelTypeSchema, ttsModelTypeSchema, ocrModelTypeSchema, diffusionModelTypeSchema, ModelType, ModelTypeAliases, } from "./model-types.js";
|
|
9
|
+
import { llmModelTypeSchema, whisperModelTypeSchema, parakeetModelTypeSchema, embeddingsModelTypeSchema, nmtModelTypeSchema, ttsModelTypeSchema, ocrModelTypeSchema, diffusionModelTypeSchema, vlaModelTypeSchema, classificationModelTypeSchema, ModelType, ModelTypeAliases, } from "./model-types.js";
|
|
10
10
|
import { sdcppConfigSchema } from "./sdcpp-config.js";
|
|
11
|
+
import { vlaConfigSchema } from "./vla.js";
|
|
12
|
+
import { classificationConfigSchema } from "./classification.js";
|
|
11
13
|
// Set of all built-in model types (canonical + aliases) for catch-all exclusion
|
|
12
14
|
const builtInModelTypes = new Set([
|
|
13
15
|
...Object.values(ModelType),
|
|
@@ -24,6 +26,7 @@ const loadModelRequestCommonFields = {
|
|
|
24
26
|
onProgress: z.unknown().optional(),
|
|
25
27
|
logger: z.unknown().optional(),
|
|
26
28
|
withProgress: z.boolean().optional(),
|
|
29
|
+
requestId: z.string().min(1).optional(),
|
|
27
30
|
};
|
|
28
31
|
export const loadBuiltinModelOptionsBaseSchema = z.union([
|
|
29
32
|
z
|
|
@@ -44,7 +47,7 @@ export const loadBuiltinModelOptionsBaseSchema = z.union([
|
|
|
44
47
|
.object({
|
|
45
48
|
...loadModelCommonFields,
|
|
46
49
|
modelType: parakeetModelTypeSchema,
|
|
47
|
-
modelConfig:
|
|
50
|
+
modelConfig: parakeetLoadConfigSchema.optional(),
|
|
48
51
|
})
|
|
49
52
|
.strict(),
|
|
50
53
|
z
|
|
@@ -82,6 +85,21 @@ export const loadBuiltinModelOptionsBaseSchema = z.union([
|
|
|
82
85
|
modelConfig: sdcppConfigSchema.strict().optional(),
|
|
83
86
|
})
|
|
84
87
|
.strict(),
|
|
88
|
+
z
|
|
89
|
+
.object({
|
|
90
|
+
...loadModelCommonFields,
|
|
91
|
+
modelType: vlaModelTypeSchema,
|
|
92
|
+
modelConfig: vlaConfigSchema.strict().optional(),
|
|
93
|
+
})
|
|
94
|
+
.strict(),
|
|
95
|
+
z
|
|
96
|
+
.object({
|
|
97
|
+
...loadModelCommonFields,
|
|
98
|
+
modelSrc: modelSrcInputSchema.optional(),
|
|
99
|
+
modelType: classificationModelTypeSchema,
|
|
100
|
+
modelConfig: classificationConfigSchema.strict().optional(),
|
|
101
|
+
})
|
|
102
|
+
.strict(),
|
|
85
103
|
]);
|
|
86
104
|
// Custom plugin catch-all: any modelType string EXCEPT built-ins.
|
|
87
105
|
export const loadCustomPluginModelOptionsBaseSchema = z.object({
|
|
@@ -116,6 +134,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
116
134
|
seed: data.seed ?? false,
|
|
117
135
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
118
136
|
delegate: data.delegate,
|
|
137
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
119
138
|
})),
|
|
120
139
|
z
|
|
121
140
|
.object({
|
|
@@ -133,12 +152,13 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
133
152
|
seed: data.seed ?? false,
|
|
134
153
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
135
154
|
delegate: data.delegate,
|
|
155
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
136
156
|
})),
|
|
137
157
|
z
|
|
138
158
|
.object({
|
|
139
159
|
...loadModelRequestCommonFields,
|
|
140
160
|
modelType: parakeetModelTypeSchema,
|
|
141
|
-
modelConfig:
|
|
161
|
+
modelConfig: parakeetLoadConfigSchema.optional(),
|
|
142
162
|
})
|
|
143
163
|
.strict()
|
|
144
164
|
.transform((data) => ({
|
|
@@ -150,6 +170,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
150
170
|
seed: data.seed ?? false,
|
|
151
171
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
152
172
|
delegate: data.delegate,
|
|
173
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
153
174
|
})),
|
|
154
175
|
z
|
|
155
176
|
.object({
|
|
@@ -167,6 +188,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
167
188
|
seed: data.seed ?? false,
|
|
168
189
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
169
190
|
delegate: data.delegate,
|
|
191
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
170
192
|
})),
|
|
171
193
|
z
|
|
172
194
|
.object({
|
|
@@ -192,6 +214,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
192
214
|
seed: data.seed ?? false,
|
|
193
215
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
194
216
|
delegate: data.delegate,
|
|
217
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
195
218
|
})),
|
|
196
219
|
z
|
|
197
220
|
.object({
|
|
@@ -202,13 +225,14 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
202
225
|
.strict()
|
|
203
226
|
.transform((data) => ({
|
|
204
227
|
type: "loadModel",
|
|
205
|
-
modelType: ModelType.
|
|
228
|
+
modelType: ModelType.ttsGgml,
|
|
206
229
|
modelSrc: modelInputToSrcSchema.parse(data.modelSrc),
|
|
207
230
|
modelName: modelInputToNameSchema.parse(data.modelSrc),
|
|
208
231
|
modelConfig: data.modelConfig,
|
|
209
232
|
seed: data.seed ?? false,
|
|
210
233
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
211
234
|
delegate: data.delegate,
|
|
235
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
212
236
|
})),
|
|
213
237
|
z
|
|
214
238
|
.object({
|
|
@@ -226,6 +250,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
226
250
|
seed: data.seed ?? false,
|
|
227
251
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
228
252
|
delegate: data.delegate,
|
|
253
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
229
254
|
})),
|
|
230
255
|
z
|
|
231
256
|
.object({
|
|
@@ -243,6 +268,44 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
243
268
|
seed: data.seed ?? false,
|
|
244
269
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
245
270
|
delegate: data.delegate,
|
|
271
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
272
|
+
})),
|
|
273
|
+
z
|
|
274
|
+
.object({
|
|
275
|
+
...loadModelRequestCommonFields,
|
|
276
|
+
modelType: vlaModelTypeSchema,
|
|
277
|
+
modelConfig: vlaConfigSchema.strict().optional(),
|
|
278
|
+
})
|
|
279
|
+
.strict()
|
|
280
|
+
.transform((data) => ({
|
|
281
|
+
type: "loadModel",
|
|
282
|
+
modelType: ModelType.ggmlVla,
|
|
283
|
+
modelSrc: modelInputToSrcSchema.parse(data.modelSrc),
|
|
284
|
+
modelName: modelInputToNameSchema.parse(data.modelSrc),
|
|
285
|
+
modelConfig: data.modelConfig ?? {},
|
|
286
|
+
seed: data.seed ?? false,
|
|
287
|
+
withProgress: data.withProgress ?? !!data.onProgress,
|
|
288
|
+
delegate: data.delegate,
|
|
289
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
290
|
+
})),
|
|
291
|
+
z
|
|
292
|
+
.object({
|
|
293
|
+
...loadModelRequestCommonFields,
|
|
294
|
+
modelSrc: modelSrcInputSchema.optional(),
|
|
295
|
+
modelType: classificationModelTypeSchema,
|
|
296
|
+
modelConfig: classificationConfigSchema.strict().optional(),
|
|
297
|
+
})
|
|
298
|
+
.strict()
|
|
299
|
+
.transform((data) => ({
|
|
300
|
+
type: "loadModel",
|
|
301
|
+
modelType: ModelType.ggmlClassification,
|
|
302
|
+
modelSrc: data.modelSrc ? modelInputToSrcSchema.parse(data.modelSrc) : "",
|
|
303
|
+
modelName: data.modelSrc ? modelInputToNameSchema.parse(data.modelSrc) : undefined,
|
|
304
|
+
modelConfig: data.modelConfig ?? {},
|
|
305
|
+
seed: data.seed ?? false,
|
|
306
|
+
withProgress: data.withProgress ?? !!data.onProgress,
|
|
307
|
+
delegate: data.delegate,
|
|
308
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
246
309
|
})),
|
|
247
310
|
z
|
|
248
311
|
.object({
|
|
@@ -261,6 +324,7 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
261
324
|
seed: data.seed ?? false,
|
|
262
325
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
263
326
|
delegate: data.delegate,
|
|
327
|
+
...(data.requestId !== undefined && { requestId: data.requestId }),
|
|
264
328
|
})),
|
|
265
329
|
]);
|
|
266
330
|
export const loadModelOptionsToRequestSchema = loadModelOptionsToRequestBaseSchema;
|
|
@@ -271,6 +335,11 @@ const commonModelConfigSchema = z.object({
|
|
|
271
335
|
withProgress: z.boolean().optional(),
|
|
272
336
|
seed: z.boolean().optional(),
|
|
273
337
|
delegate: delegateSchema,
|
|
338
|
+
requestId: z
|
|
339
|
+
.string()
|
|
340
|
+
.min(1)
|
|
341
|
+
.optional()
|
|
342
|
+
.describe("Stable identifier for this in-flight load, generated by the client at call time. Optional on the wire so legacy clients keep working — the server falls back to a server-generated id when the field is missing. Exposed on the client-side decorated promise so callers can target this load with `cancel({ requestId })`."),
|
|
274
343
|
});
|
|
275
344
|
// Request schemas for each model type (use canonical types since transforms normalize)
|
|
276
345
|
// Use base schemas (no defaults) for client-side validation.
|
|
@@ -290,7 +359,7 @@ export const loadWhisperModelRequestSchema = commonModelConfigSchema
|
|
|
290
359
|
export const loadParakeetModelRequestSchema = commonModelConfigSchema
|
|
291
360
|
.extend({
|
|
292
361
|
modelType: z.literal(ModelType.parakeetTranscription),
|
|
293
|
-
modelConfig:
|
|
362
|
+
modelConfig: parakeetLoadConfigSchema.optional(),
|
|
294
363
|
})
|
|
295
364
|
.strict();
|
|
296
365
|
export const loadEmbeddingsModelRequestSchema = commonModelConfigSchema
|
|
@@ -307,7 +376,7 @@ export const loadNmtModelRequestSchema = commonModelConfigSchema
|
|
|
307
376
|
.strict();
|
|
308
377
|
export const loadTtsModelRequestSchema = commonModelConfigSchema
|
|
309
378
|
.extend({
|
|
310
|
-
modelType: z.literal(ModelType.
|
|
379
|
+
modelType: z.literal(ModelType.ttsGgml),
|
|
311
380
|
modelConfig: ttsConfigSchema,
|
|
312
381
|
})
|
|
313
382
|
.strict();
|
|
@@ -323,6 +392,18 @@ export const loadDiffusionModelRequestSchema = commonModelConfigSchema
|
|
|
323
392
|
modelConfig: sdcppConfigSchema.optional(),
|
|
324
393
|
})
|
|
325
394
|
.strict();
|
|
395
|
+
export const loadVlaModelRequestSchema = commonModelConfigSchema
|
|
396
|
+
.extend({
|
|
397
|
+
modelType: z.literal(ModelType.ggmlVla),
|
|
398
|
+
modelConfig: vlaConfigSchema.optional(),
|
|
399
|
+
})
|
|
400
|
+
.strict();
|
|
401
|
+
export const loadClassificationModelRequestSchema = commonModelConfigSchema
|
|
402
|
+
.extend({
|
|
403
|
+
modelType: z.literal(ModelType.ggmlClassification),
|
|
404
|
+
modelConfig: classificationConfigSchema.optional(),
|
|
405
|
+
})
|
|
406
|
+
.strict();
|
|
326
407
|
// Custom plugin catch-all: accepts any modelType string EXCEPT built-ins
|
|
327
408
|
export const loadCustomPluginModelRequestSchema = commonModelConfigSchema.extend({
|
|
328
409
|
modelType: z.string().refine((val) => !builtInModelTypes.has(val), {
|
|
@@ -341,6 +422,8 @@ export const loadModelSrcRequestSchema = z
|
|
|
341
422
|
loadTtsModelRequestSchema,
|
|
342
423
|
loadOcrModelRequestSchema,
|
|
343
424
|
loadDiffusionModelRequestSchema,
|
|
425
|
+
loadVlaModelRequestSchema,
|
|
426
|
+
loadClassificationModelRequestSchema,
|
|
344
427
|
loadCustomPluginModelRequestSchema,
|
|
345
428
|
])
|
|
346
429
|
.transform((data) => ({
|
|
@@ -12,21 +12,26 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
12
12
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
13
13
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
14
14
|
embeddings: "embeddings";
|
|
15
|
+
diffusion: "diffusion";
|
|
16
|
+
tts: "tts";
|
|
17
|
+
ocr: "ocr";
|
|
18
|
+
vla: "vla";
|
|
15
19
|
"llamacpp-completion": "llamacpp-completion";
|
|
16
20
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
17
21
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
18
22
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
19
23
|
"onnx-tts": "onnx-tts";
|
|
24
|
+
"tts-ggml": "tts-ggml";
|
|
20
25
|
"parakeet-transcription": "parakeet-transcription";
|
|
21
26
|
"onnx-ocr": "onnx-ocr";
|
|
22
27
|
"sdcpp-generation": "sdcpp-generation";
|
|
28
|
+
"ggml-vla": "ggml-vla";
|
|
29
|
+
"ggml-classification": "ggml-classification";
|
|
23
30
|
llm: "llm";
|
|
24
31
|
whisper: "whisper";
|
|
25
32
|
nmt: "nmt";
|
|
26
33
|
parakeet: "parakeet";
|
|
27
|
-
|
|
28
|
-
ocr: "ocr";
|
|
29
|
-
diffusion: "diffusion";
|
|
34
|
+
classification: "classification";
|
|
30
35
|
}>, z.ZodLiteral<"vad">]>>;
|
|
31
36
|
}, z.core.$strip>;
|
|
32
37
|
export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -42,21 +47,26 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
42
47
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
43
48
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
44
49
|
embeddings: "embeddings";
|
|
50
|
+
diffusion: "diffusion";
|
|
51
|
+
tts: "tts";
|
|
52
|
+
ocr: "ocr";
|
|
53
|
+
vla: "vla";
|
|
45
54
|
"llamacpp-completion": "llamacpp-completion";
|
|
46
55
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
47
56
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
48
57
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
49
58
|
"onnx-tts": "onnx-tts";
|
|
59
|
+
"tts-ggml": "tts-ggml";
|
|
50
60
|
"parakeet-transcription": "parakeet-transcription";
|
|
51
61
|
"onnx-ocr": "onnx-ocr";
|
|
52
62
|
"sdcpp-generation": "sdcpp-generation";
|
|
63
|
+
"ggml-vla": "ggml-vla";
|
|
64
|
+
"ggml-classification": "ggml-classification";
|
|
53
65
|
llm: "llm";
|
|
54
66
|
whisper: "whisper";
|
|
55
67
|
nmt: "nmt";
|
|
56
68
|
parakeet: "parakeet";
|
|
57
|
-
|
|
58
|
-
ocr: "ocr";
|
|
59
|
-
diffusion: "diffusion";
|
|
69
|
+
classification: "classification";
|
|
60
70
|
}>, z.ZodLiteral<"vad">]>>;
|
|
61
71
|
}, z.core.$strip>]>;
|
|
62
72
|
export type ModelDescriptor = z.infer<typeof modelDescriptorSchema>;
|
|
@@ -78,21 +88,26 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
78
88
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
79
89
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
80
90
|
embeddings: "embeddings";
|
|
91
|
+
diffusion: "diffusion";
|
|
92
|
+
tts: "tts";
|
|
93
|
+
ocr: "ocr";
|
|
94
|
+
vla: "vla";
|
|
81
95
|
"llamacpp-completion": "llamacpp-completion";
|
|
82
96
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
83
97
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
84
98
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
85
99
|
"onnx-tts": "onnx-tts";
|
|
100
|
+
"tts-ggml": "tts-ggml";
|
|
86
101
|
"parakeet-transcription": "parakeet-transcription";
|
|
87
102
|
"onnx-ocr": "onnx-ocr";
|
|
88
103
|
"sdcpp-generation": "sdcpp-generation";
|
|
104
|
+
"ggml-vla": "ggml-vla";
|
|
105
|
+
"ggml-classification": "ggml-classification";
|
|
89
106
|
llm: "llm";
|
|
90
107
|
whisper: "whisper";
|
|
91
108
|
nmt: "nmt";
|
|
92
109
|
parakeet: "parakeet";
|
|
93
|
-
|
|
94
|
-
ocr: "ocr";
|
|
95
|
-
diffusion: "diffusion";
|
|
110
|
+
classification: "classification";
|
|
96
111
|
}>, z.ZodLiteral<"vad">]>>;
|
|
97
112
|
}, z.core.$strip>]>, z.ZodTransform<string, string | {
|
|
98
113
|
src: string;
|
|
@@ -105,7 +120,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
105
120
|
engine?: string | undefined;
|
|
106
121
|
expectedSize?: number | undefined;
|
|
107
122
|
sha256Checksum?: string | undefined;
|
|
108
|
-
addon?: "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "
|
|
123
|
+
addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
109
124
|
}>>;
|
|
110
125
|
/**
|
|
111
126
|
* Schema that transforms ModelSrc to its optional name
|
|
@@ -124,21 +139,26 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
124
139
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
125
140
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
126
141
|
embeddings: "embeddings";
|
|
142
|
+
diffusion: "diffusion";
|
|
143
|
+
tts: "tts";
|
|
144
|
+
ocr: "ocr";
|
|
145
|
+
vla: "vla";
|
|
127
146
|
"llamacpp-completion": "llamacpp-completion";
|
|
128
147
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
129
148
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
130
149
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
131
150
|
"onnx-tts": "onnx-tts";
|
|
151
|
+
"tts-ggml": "tts-ggml";
|
|
132
152
|
"parakeet-transcription": "parakeet-transcription";
|
|
133
153
|
"onnx-ocr": "onnx-ocr";
|
|
134
154
|
"sdcpp-generation": "sdcpp-generation";
|
|
155
|
+
"ggml-vla": "ggml-vla";
|
|
156
|
+
"ggml-classification": "ggml-classification";
|
|
135
157
|
llm: "llm";
|
|
136
158
|
whisper: "whisper";
|
|
137
159
|
nmt: "nmt";
|
|
138
160
|
parakeet: "parakeet";
|
|
139
|
-
|
|
140
|
-
ocr: "ocr";
|
|
141
|
-
diffusion: "diffusion";
|
|
161
|
+
classification: "classification";
|
|
142
162
|
}>, z.ZodLiteral<"vad">]>>;
|
|
143
163
|
}, z.core.$strip>]>, z.ZodTransform<string | undefined, string | {
|
|
144
164
|
src: string;
|
|
@@ -151,7 +171,7 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
151
171
|
engine?: string | undefined;
|
|
152
172
|
expectedSize?: number | undefined;
|
|
153
173
|
sha256Checksum?: string | undefined;
|
|
154
|
-
addon?: "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "
|
|
174
|
+
addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
155
175
|
}>>;
|
|
156
176
|
export declare function inferModelTypeFromModelSrc(modelSrc: unknown): string | undefined;
|
|
157
177
|
//# sourceMappingURL=model-src-utils.d.ts.map
|
|
@@ -10,9 +10,12 @@ export declare const ModelType: {
|
|
|
10
10
|
readonly llamacppEmbedding: "llamacpp-embedding";
|
|
11
11
|
readonly nmtcppTranslation: "nmtcpp-translation";
|
|
12
12
|
readonly onnxTts: "onnx-tts";
|
|
13
|
+
readonly ttsGgml: "tts-ggml";
|
|
13
14
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
14
15
|
readonly onnxOcr: "onnx-ocr";
|
|
15
16
|
readonly sdcppGeneration: "sdcpp-generation";
|
|
17
|
+
readonly ggmlVla: "ggml-vla";
|
|
18
|
+
readonly ggmlClassification: "ggml-classification";
|
|
16
19
|
};
|
|
17
20
|
/**
|
|
18
21
|
* Alias mappings for backward compatibility.
|
|
@@ -24,9 +27,11 @@ export declare const ModelTypeAliases: {
|
|
|
24
27
|
readonly embeddings: "llamacpp-embedding";
|
|
25
28
|
readonly nmt: "nmtcpp-translation";
|
|
26
29
|
readonly parakeet: "parakeet-transcription";
|
|
27
|
-
readonly tts: "
|
|
30
|
+
readonly tts: "tts-ggml";
|
|
28
31
|
readonly ocr: "onnx-ocr";
|
|
29
32
|
readonly diffusion: "sdcpp-generation";
|
|
33
|
+
readonly vla: "ggml-vla";
|
|
34
|
+
readonly classification: "ggml-classification";
|
|
30
35
|
};
|
|
31
36
|
export type CanonicalModelType = (typeof ModelType)[keyof typeof ModelType];
|
|
32
37
|
export type AliasKey = keyof typeof ModelTypeAliases;
|
|
@@ -53,56 +58,71 @@ export declare const PUBLIC_MODEL_TYPES: {
|
|
|
53
58
|
readonly embeddings: "llamacpp-embedding";
|
|
54
59
|
readonly nmt: "nmtcpp-translation";
|
|
55
60
|
readonly parakeet: "parakeet-transcription";
|
|
56
|
-
readonly tts: "
|
|
61
|
+
readonly tts: "tts-ggml";
|
|
57
62
|
readonly ocr: "onnx-ocr";
|
|
58
63
|
readonly diffusion: "sdcpp-generation";
|
|
64
|
+
readonly vla: "ggml-vla";
|
|
65
|
+
readonly classification: "ggml-classification";
|
|
59
66
|
readonly llamacppCompletion: "llamacpp-completion";
|
|
60
67
|
readonly whispercppTranscription: "whispercpp-transcription";
|
|
61
68
|
readonly llamacppEmbedding: "llamacpp-embedding";
|
|
62
69
|
readonly nmtcppTranslation: "nmtcpp-translation";
|
|
63
70
|
readonly onnxTts: "onnx-tts";
|
|
71
|
+
readonly ttsGgml: "tts-ggml";
|
|
64
72
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
65
73
|
readonly onnxOcr: "onnx-ocr";
|
|
66
74
|
readonly sdcppGeneration: "sdcpp-generation";
|
|
75
|
+
readonly ggmlVla: "ggml-vla";
|
|
76
|
+
readonly ggmlClassification: "ggml-classification";
|
|
67
77
|
};
|
|
68
78
|
/** Schema accepting both canonical and alias model type inputs */
|
|
69
79
|
export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
70
80
|
embeddings: "embeddings";
|
|
81
|
+
diffusion: "diffusion";
|
|
82
|
+
tts: "tts";
|
|
83
|
+
ocr: "ocr";
|
|
84
|
+
vla: "vla";
|
|
71
85
|
"llamacpp-completion": "llamacpp-completion";
|
|
72
86
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
73
87
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
74
88
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
75
89
|
"onnx-tts": "onnx-tts";
|
|
90
|
+
"tts-ggml": "tts-ggml";
|
|
76
91
|
"parakeet-transcription": "parakeet-transcription";
|
|
77
92
|
"onnx-ocr": "onnx-ocr";
|
|
78
93
|
"sdcpp-generation": "sdcpp-generation";
|
|
94
|
+
"ggml-vla": "ggml-vla";
|
|
95
|
+
"ggml-classification": "ggml-classification";
|
|
79
96
|
llm: "llm";
|
|
80
97
|
whisper: "whisper";
|
|
81
98
|
nmt: "nmt";
|
|
82
99
|
parakeet: "parakeet";
|
|
83
|
-
|
|
84
|
-
ocr: "ocr";
|
|
85
|
-
diffusion: "diffusion";
|
|
100
|
+
classification: "classification";
|
|
86
101
|
}>;
|
|
87
102
|
/** Schema that transforms input to canonical model type */
|
|
88
103
|
export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
89
104
|
embeddings: "embeddings";
|
|
105
|
+
diffusion: "diffusion";
|
|
106
|
+
tts: "tts";
|
|
107
|
+
ocr: "ocr";
|
|
108
|
+
vla: "vla";
|
|
90
109
|
"llamacpp-completion": "llamacpp-completion";
|
|
91
110
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
92
111
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
93
112
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
94
113
|
"onnx-tts": "onnx-tts";
|
|
114
|
+
"tts-ggml": "tts-ggml";
|
|
95
115
|
"parakeet-transcription": "parakeet-transcription";
|
|
96
116
|
"onnx-ocr": "onnx-ocr";
|
|
97
117
|
"sdcpp-generation": "sdcpp-generation";
|
|
118
|
+
"ggml-vla": "ggml-vla";
|
|
119
|
+
"ggml-classification": "ggml-classification";
|
|
98
120
|
llm: "llm";
|
|
99
121
|
whisper: "whisper";
|
|
100
122
|
nmt: "nmt";
|
|
101
123
|
parakeet: "parakeet";
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
diffusion: "diffusion";
|
|
105
|
-
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation", "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion">>;
|
|
124
|
+
classification: "classification";
|
|
125
|
+
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification", "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification">>;
|
|
106
126
|
/**
|
|
107
127
|
* Normalize model type input to canonical form.
|
|
108
128
|
* Custom plugin types (not in built-ins) are returned as-is.
|
|
@@ -170,12 +190,12 @@ export declare const nmtModelTypeSchema: z.ZodEnum<{
|
|
|
170
190
|
export type NmtModelTypeInput = z.infer<typeof nmtModelTypeSchema>;
|
|
171
191
|
/**
|
|
172
192
|
* TTS model type schema.
|
|
173
|
-
* - Alias: `"tts"` → resolves to `"
|
|
174
|
-
* - Canonical: `"
|
|
193
|
+
* - Alias: `"tts"` → resolves to `"tts-ggml"`
|
|
194
|
+
* - Canonical: `"tts-ggml"`
|
|
175
195
|
*/
|
|
176
196
|
export declare const ttsModelTypeSchema: z.ZodEnum<{
|
|
177
|
-
"onnx-tts": "onnx-tts";
|
|
178
197
|
tts: "tts";
|
|
198
|
+
"tts-ggml": "tts-ggml";
|
|
179
199
|
}>;
|
|
180
200
|
export type TtsModelTypeInput = z.infer<typeof ttsModelTypeSchema>;
|
|
181
201
|
/**
|
|
@@ -184,8 +204,8 @@ export type TtsModelTypeInput = z.infer<typeof ttsModelTypeSchema>;
|
|
|
184
204
|
* - Canonical: `"onnx-ocr"`
|
|
185
205
|
*/
|
|
186
206
|
export declare const ocrModelTypeSchema: z.ZodEnum<{
|
|
187
|
-
"onnx-ocr": "onnx-ocr";
|
|
188
207
|
ocr: "ocr";
|
|
208
|
+
"onnx-ocr": "onnx-ocr";
|
|
189
209
|
}>;
|
|
190
210
|
export type OcrModelTypeInput = z.infer<typeof ocrModelTypeSchema>;
|
|
191
211
|
/**
|
|
@@ -194,8 +214,28 @@ export type OcrModelTypeInput = z.infer<typeof ocrModelTypeSchema>;
|
|
|
194
214
|
* - Canonical: `"sdcpp-generation"`
|
|
195
215
|
*/
|
|
196
216
|
export declare const diffusionModelTypeSchema: z.ZodEnum<{
|
|
197
|
-
"sdcpp-generation": "sdcpp-generation";
|
|
198
217
|
diffusion: "diffusion";
|
|
218
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
199
219
|
}>;
|
|
200
220
|
export type DiffusionModelTypeInput = z.infer<typeof diffusionModelTypeSchema>;
|
|
221
|
+
/**
|
|
222
|
+
* VLA (vision-language-action) model type schema.
|
|
223
|
+
* - Alias: `"vla"` → resolves to `"ggml-vla"`
|
|
224
|
+
* - Canonical: `"ggml-vla"`
|
|
225
|
+
*/
|
|
226
|
+
export declare const vlaModelTypeSchema: z.ZodEnum<{
|
|
227
|
+
vla: "vla";
|
|
228
|
+
"ggml-vla": "ggml-vla";
|
|
229
|
+
}>;
|
|
230
|
+
export type VlaModelTypeInput = z.infer<typeof vlaModelTypeSchema>;
|
|
231
|
+
/**
|
|
232
|
+
* Image Classification model type schema.
|
|
233
|
+
* - Alias: `"classification"` → resolves to `"ggml-classification"`
|
|
234
|
+
* - Canonical: `"ggml-classification"`
|
|
235
|
+
*/
|
|
236
|
+
export declare const classificationModelTypeSchema: z.ZodEnum<{
|
|
237
|
+
"ggml-classification": "ggml-classification";
|
|
238
|
+
classification: "classification";
|
|
239
|
+
}>;
|
|
240
|
+
export type ClassificationModelTypeInput = z.infer<typeof classificationModelTypeSchema>;
|
|
201
241
|
//# sourceMappingURL=model-types.d.ts.map
|
|
@@ -11,9 +11,12 @@ export const ModelType = {
|
|
|
11
11
|
llamacppEmbedding: "llamacpp-embedding",
|
|
12
12
|
nmtcppTranslation: "nmtcpp-translation",
|
|
13
13
|
onnxTts: "onnx-tts",
|
|
14
|
+
ttsGgml: "tts-ggml",
|
|
14
15
|
parakeetTranscription: "parakeet-transcription",
|
|
15
16
|
onnxOcr: "onnx-ocr",
|
|
16
17
|
sdcppGeneration: "sdcpp-generation",
|
|
18
|
+
ggmlVla: "ggml-vla",
|
|
19
|
+
ggmlClassification: "ggml-classification",
|
|
17
20
|
};
|
|
18
21
|
// === INTERNAL: Alias keys (backward compat names) ===
|
|
19
22
|
const AliasKeys = {
|
|
@@ -25,6 +28,8 @@ const AliasKeys = {
|
|
|
25
28
|
tts: "tts",
|
|
26
29
|
ocr: "ocr",
|
|
27
30
|
diffusion: "diffusion",
|
|
31
|
+
vla: "vla",
|
|
32
|
+
classification: "classification",
|
|
28
33
|
};
|
|
29
34
|
// === INTERNAL: Aliases (backward compat mapping) ===
|
|
30
35
|
/**
|
|
@@ -37,9 +42,11 @@ export const ModelTypeAliases = {
|
|
|
37
42
|
[AliasKeys.embeddings]: ModelType.llamacppEmbedding,
|
|
38
43
|
[AliasKeys.nmt]: ModelType.nmtcppTranslation,
|
|
39
44
|
[AliasKeys.parakeet]: ModelType.parakeetTranscription,
|
|
40
|
-
[AliasKeys.tts]: ModelType.
|
|
45
|
+
[AliasKeys.tts]: ModelType.ttsGgml,
|
|
41
46
|
[AliasKeys.ocr]: ModelType.onnxOcr,
|
|
42
47
|
[AliasKeys.diffusion]: ModelType.sdcppGeneration,
|
|
48
|
+
[AliasKeys.vla]: ModelType.ggmlVla,
|
|
49
|
+
[AliasKeys.classification]: ModelType.ggmlClassification,
|
|
43
50
|
};
|
|
44
51
|
// Set of canonical values for quick lookup
|
|
45
52
|
const canonicalValuesSet = new Set(Object.values(ModelType));
|
|
@@ -155,12 +162,12 @@ export const nmtModelTypeSchema = modelTypeInputSchema
|
|
|
155
162
|
.describe('NMT model type: "nmt" (alias) or "nmtcpp-translation" (canonical)');
|
|
156
163
|
/**
|
|
157
164
|
* TTS model type schema.
|
|
158
|
-
* - Alias: `"tts"` → resolves to `"
|
|
159
|
-
* - Canonical: `"
|
|
165
|
+
* - Alias: `"tts"` → resolves to `"tts-ggml"`
|
|
166
|
+
* - Canonical: `"tts-ggml"`
|
|
160
167
|
*/
|
|
161
168
|
export const ttsModelTypeSchema = modelTypeInputSchema
|
|
162
|
-
.extract([AliasKeys.tts, ModelType.
|
|
163
|
-
.describe('TTS model type: "tts" (alias) or "
|
|
169
|
+
.extract([AliasKeys.tts, ModelType.ttsGgml])
|
|
170
|
+
.describe('TTS model type: "tts" (alias) or "tts-ggml" (canonical)');
|
|
164
171
|
/**
|
|
165
172
|
* OCR model type schema.
|
|
166
173
|
* - Alias: `"ocr"` → resolves to `"onnx-ocr"`
|
|
@@ -177,3 +184,19 @@ export const ocrModelTypeSchema = modelTypeInputSchema
|
|
|
177
184
|
export const diffusionModelTypeSchema = modelTypeInputSchema
|
|
178
185
|
.extract([AliasKeys.diffusion, ModelType.sdcppGeneration])
|
|
179
186
|
.describe('Diffusion model type: "diffusion" (alias) or "sdcpp-generation" (canonical)');
|
|
187
|
+
/**
|
|
188
|
+
* VLA (vision-language-action) model type schema.
|
|
189
|
+
* - Alias: `"vla"` → resolves to `"ggml-vla"`
|
|
190
|
+
* - Canonical: `"ggml-vla"`
|
|
191
|
+
*/
|
|
192
|
+
export const vlaModelTypeSchema = modelTypeInputSchema
|
|
193
|
+
.extract([AliasKeys.vla, ModelType.ggmlVla])
|
|
194
|
+
.describe('VLA model type: "vla" (alias) or "ggml-vla" (canonical)');
|
|
195
|
+
/**
|
|
196
|
+
* Image Classification model type schema.
|
|
197
|
+
* - Alias: `"classification"` → resolves to `"ggml-classification"`
|
|
198
|
+
* - Canonical: `"ggml-classification"`
|
|
199
|
+
*/
|
|
200
|
+
export const classificationModelTypeSchema = modelTypeInputSchema
|
|
201
|
+
.extract([AliasKeys.classification, ModelType.ggmlClassification])
|
|
202
|
+
.describe('Classification model type: "classification" (alias) or "ggml-classification" (canonical)');
|
package/dist/schemas/ocr.d.ts
CHANGED
|
@@ -30,21 +30,26 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
30
30
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
31
31
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
32
32
|
embeddings: "embeddings";
|
|
33
|
+
diffusion: "diffusion";
|
|
34
|
+
tts: "tts";
|
|
35
|
+
ocr: "ocr";
|
|
36
|
+
vla: "vla";
|
|
33
37
|
"llamacpp-completion": "llamacpp-completion";
|
|
34
38
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
35
39
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
36
40
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
37
41
|
"onnx-tts": "onnx-tts";
|
|
42
|
+
"tts-ggml": "tts-ggml";
|
|
38
43
|
"parakeet-transcription": "parakeet-transcription";
|
|
39
44
|
"onnx-ocr": "onnx-ocr";
|
|
40
45
|
"sdcpp-generation": "sdcpp-generation";
|
|
46
|
+
"ggml-vla": "ggml-vla";
|
|
47
|
+
"ggml-classification": "ggml-classification";
|
|
41
48
|
llm: "llm";
|
|
42
49
|
whisper: "whisper";
|
|
43
50
|
nmt: "nmt";
|
|
44
51
|
parakeet: "parakeet";
|
|
45
|
-
|
|
46
|
-
ocr: "ocr";
|
|
47
|
-
diffusion: "diffusion";
|
|
52
|
+
classification: "classification";
|
|
48
53
|
}>, z.ZodLiteral<"vad">]>>;
|
|
49
54
|
}, z.core.$strip>]>>;
|
|
50
55
|
}, z.core.$strip>;
|