@qvac/inference 0.22.0 → 0.24.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 +111 -60
- package/README.md +4 -2
- package/dist/api/assess-model-fit.d.ts +14 -14
- package/dist/api/assess-model-fit.js +14 -14
- package/dist/api/audio-gen.d.ts +2 -2
- package/dist/api/audio-gen.js +136 -45
- package/dist/api/batch-completion.js +2 -1
- package/dist/api/calc-tokens.d.ts +30 -0
- package/dist/api/calc-tokens.js +41 -0
- package/dist/api/classify.d.ts +5 -2
- package/dist/api/classify.js +5 -2
- package/dist/api/completion-stream.d.ts +2 -1
- package/dist/api/completion-stream.js +4 -1
- package/dist/api/decide.js +1 -1
- package/dist/api/delete-cache.d.ts +7 -1
- package/dist/api/delete-cache.js +11 -1
- package/dist/api/diffusion.d.ts +32 -2
- package/dist/api/diffusion.js +32 -2
- package/dist/api/download-asset.js +1 -1
- package/dist/api/embed.d.ts +82 -29
- package/dist/api/embed.js +64 -18
- package/dist/api/finetune.js +1 -1
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +40 -38
- package/dist/api/index.js +39 -37
- package/dist/api/load-model.js +2 -2
- package/dist/api/logging-stream-registry.js +11 -7
- package/dist/api/logging-stream.d.ts +11 -1
- package/dist/api/logging-stream.js +11 -2
- package/dist/api/rag.d.ts +1 -1
- package/dist/api/rag.js +1 -1
- package/dist/api/registry.d.ts +18 -7
- package/dist/api/registry.js +37 -13
- package/dist/api/rerank.d.ts +17 -0
- package/dist/api/rerank.js +36 -0
- package/dist/api/subscribe-logs.js +5 -3
- package/dist/api/text-to-speech.d.ts +14 -5
- package/dist/api/text-to-speech.js +83 -29
- package/dist/api/transcribe.d.ts +6 -2
- package/dist/api/transcribe.js +7 -1
- package/dist/api/unload-model.js +1 -1
- package/dist/api/vector-index.d.ts +25 -3
- package/dist/api/vector-index.js +17 -2
- package/dist/api/video-request.d.ts +15 -15
- package/dist/api/video.js +1 -1
- package/dist/api/vla.js +1 -1
- package/dist/api/world-result.js +1 -1
- package/dist/api/world.d.ts +1 -1
- package/dist/api/world.js +1 -1
- package/dist/config/resolve-config.d.ts +1 -1
- package/dist/config/resolve-config.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/dispatch.d.ts +11 -4
- package/dist/dispatch.js +80 -18
- package/dist/engine.d.ts +1 -1
- package/dist/errors/index.d.ts +76 -0
- package/dist/errors/index.js +141 -1
- package/dist/handlers/assess-model-fit.d.ts +3 -21
- package/dist/handlers/assess-model-fit.js +4 -303
- package/dist/handlers/cancelHandler.d.ts +10 -9
- package/dist/handlers/cancelHandler.js +18 -14
- package/dist/handlers/completion-orchestrate.d.ts +14 -2
- package/dist/handlers/completion-orchestrate.js +166 -24
- package/dist/handlers/delete-cache.d.ts +2 -1
- package/dist/handlers/delete-cache.js +6 -1
- package/dist/handlers/download-asset.js +13 -6
- package/dist/handlers/finetune.js +1 -1
- package/dist/handlers/get-loaded-model-info.js +3 -3
- package/dist/handlers/get-model-info.js +72 -3
- package/dist/handlers/load-model/coreml-sidecars.d.ts +15 -11
- package/dist/handlers/load-model/coreml-sidecars.js +51 -91
- package/dist/handlers/load-model/download-lock.d.ts +20 -0
- package/dist/handlers/load-model/download-lock.js +213 -0
- package/dist/handlers/load-model/download-manager.d.ts +11 -3
- package/dist/handlers/load-model/download-manager.js +62 -11
- package/dist/handlers/load-model/download-stats.d.ts +2 -2
- package/dist/handlers/load-model/download-stats.js +3 -3
- package/dist/handlers/load-model/handler.js +97 -41
- package/dist/handlers/load-model/http-verify.d.ts +1 -1
- package/dist/handlers/load-model/http.d.ts +1 -1
- package/dist/handlers/load-model/http.js +330 -208
- package/dist/handlers/load-model/hyperdrive.d.ts +16 -1
- package/dist/handlers/load-model/hyperdrive.js +125 -52
- package/dist/handlers/load-model/index.d.ts +2 -2
- package/dist/handlers/load-model/index.js +2 -2
- package/dist/handlers/load-model/registry-client-options.d.ts +2 -0
- package/dist/handlers/load-model/registry-client-options.js +4 -2
- package/dist/handlers/load-model/registry-companion-set.d.ts +6 -1
- package/dist/handlers/load-model/registry-companion-set.js +20 -2
- package/dist/handlers/load-model/registry-delete.d.ts +5 -0
- package/dist/handlers/load-model/registry-delete.js +269 -0
- package/dist/handlers/load-model/registry-download-utils.d.ts +7 -5
- package/dist/handlers/load-model/registry-download-utils.js +95 -24
- package/dist/handlers/load-model/registry.d.ts +22 -2
- package/dist/handlers/load-model/registry.js +312 -179
- package/dist/handlers/load-model/resolve-session.d.ts +1 -1
- package/dist/handlers/load-model/resolve-session.js +11 -3
- package/dist/handlers/load-model/resolve.d.ts +1 -1
- package/dist/handlers/load-model/resolve.js +9 -6
- package/dist/handlers/load-model/types.d.ts +2 -0
- package/dist/handlers/logging-stream.d.ts +2 -1
- package/dist/handlers/logging-stream.js +35 -7
- package/dist/handlers/plugin-invoke.js +152 -39
- package/dist/handlers/registry.d.ts +2 -2
- package/dist/handlers/registry.js +108 -29
- package/dist/handlers/rpc-server.js +7 -7
- package/dist/handlers/session.d.ts +11 -0
- package/dist/handlers/session.js +40 -0
- package/dist/handlers/types.d.ts +7 -1
- package/dist/handlers/unload-model.js +8 -3
- package/dist/handlers/vector-index.js +118 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +1 -1
- package/dist/logging/index.d.ts +5 -5
- package/dist/logging/index.js +4 -4
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +3 -3
- package/dist/logging/utils.js +11 -3
- package/dist/model-cache-layout.d.ts +1 -0
- package/dist/model-cache-layout.js +2 -0
- package/dist/model-fit/assess.d.ts +23 -0
- package/dist/model-fit/assess.js +110 -0
- package/dist/model-fit/describe.d.ts +12 -0
- package/dist/model-fit/describe.js +29 -0
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.d.ts → model-fit/description/fetch.d.ts} +2 -2
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.js → model-fit/description/fetch.js} +98 -19
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts → model-fit/description/resolve-load.d.ts} +8 -6
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.js → model-fit/description/resolve-load.js} +20 -20
- package/dist/model-fit/fit-load.d.ts +23 -0
- package/dist/model-fit/fit-load.js +29 -0
- package/dist/model-fit/load-check.d.ts +34 -0
- package/dist/model-fit/load-check.js +77 -0
- package/dist/model-fit/run/engine.d.ts +12 -0
- package/dist/model-fit/run/engine.js +9 -0
- package/dist/model-fit/run/run.d.ts +46 -0
- package/dist/model-fit/run/run.js +208 -0
- package/dist/model-fit/sum.d.ts +32 -0
- package/dist/model-fit/sum.js +60 -0
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +2 -2
- package/dist/models/registry/models.d.ts +1377 -130
- package/dist/models/registry/models.js +3622 -2312
- package/dist/plugins/builtin/asr-ggml/config.d.ts +19 -4
- package/dist/plugins/builtin/asr-ggml/config.js +39 -3
- package/dist/plugins/builtin/asr-ggml/fit.d.ts +18 -0
- package/dist/plugins/builtin/asr-ggml/fit.js +118 -0
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +6 -0
- package/dist/plugins/builtin/audiogen-ggml/config.js +9 -0
- package/dist/plugins/builtin/audiogen-ggml/fit.d.ts +3 -0
- package/dist/{resources/model-fit/native-probe/engines/audiogen.js → plugins/builtin/audiogen-ggml/fit.js} +28 -18
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.d.ts +17 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.js +68 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.d.ts +11 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.js +47 -11
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +203 -72
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +17 -5
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.d.ts +3 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.js +22 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +71 -29
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +12 -10
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +8 -5
- package/dist/plugins/builtin/ggml-classification/plugin.js +89 -9
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.d.ts +24 -0
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.js +184 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.d.ts +120 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.js +39 -0
- package/dist/plugins/builtin/ggml-ocr/fit.d.ts +6 -0
- package/dist/plugins/builtin/ggml-ocr/fit.js +19 -0
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +20 -13
- package/dist/plugins/builtin/ggml-ocr/plugin.js +111 -25
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.d.ts +2 -2
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.js +18 -2
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +15 -15
- package/dist/plugins/builtin/ggml-vla/plugin.js +3 -3
- package/dist/plugins/builtin/index.d.ts +16 -14
- package/dist/plugins/builtin/index.js +16 -14
- package/dist/plugins/builtin/llamacpp-completion/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-completion/fit.js +28 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +6 -8
- package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.js +15 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.d.ts +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.js +32 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +6 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +18 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +94 -21
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.d.ts +5 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.js +54 -19
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +5 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +9 -7
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +315 -95
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +51 -25
- package/dist/plugins/builtin/llamacpp-completion/transform.js +4 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +0 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +7 -15
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +6 -3
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +43 -35
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +4 -3
- package/dist/plugins/builtin/llamacpp-embedding/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-embedding/fit.js +23 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +201 -10
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +52 -16
- package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +2 -2
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +29 -2
- package/dist/plugins/builtin/llamacpp-rerank/helpers.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-rerank/helpers.js +16 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.d.ts +7 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.js +120 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.d.ts +92 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.js +44 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +46 -19
- package/dist/plugins/builtin/moss-transcribe/plugin.js +9 -7
- package/dist/plugins/builtin/nmtcpp-translation/fit.d.ts +3 -0
- package/dist/plugins/builtin/nmtcpp-translation/fit.js +11 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +32 -18
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +8 -6
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +234 -38
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +42 -16
- package/dist/plugins/builtin/sdcpp-generation/fit.d.ts +3 -0
- package/dist/plugins/builtin/sdcpp-generation/fit.js +68 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.d.ts +30 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.js +121 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.d.ts +8 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.js +174 -53
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.d.ts +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.js +107 -22
- package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +7 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +23 -9
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +6 -4
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +8 -3
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +166 -47
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +67 -155
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.d.ts +15 -0
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.js +19 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.d.ts +8 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.js +9 -0
- package/dist/plugins/builtin/tts-ggml/fit.d.ts +3 -0
- package/dist/plugins/builtin/tts-ggml/fit.js +162 -0
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.d.ts +3 -2
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +24 -11
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +53 -18
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.d.ts +50 -0
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.js +74 -0
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +415 -57
- package/dist/plugins/builtin/tts-ggml/plugin.js +183 -34
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +104 -40
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +12 -10
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/ops/bci-transcribe.d.ts +5 -4
- package/dist/plugins/ops/bci-transcribe.js +18 -4
- package/dist/plugins/ops/cancel.d.ts +1 -0
- package/dist/plugins/ops/cancel.js +11 -2
- package/dist/plugins/ops/embed.d.ts +5 -3
- package/dist/plugins/ops/embed.js +89 -34
- package/dist/plugins/ops/kv-cache-utils.d.ts +5 -3
- package/dist/plugins/ops/kv-cache-utils.js +21 -10
- package/dist/plugins/ops/load-model.d.ts +10 -2
- package/dist/plugins/ops/load-model.js +45 -19
- package/dist/plugins/ops/transcribe.d.ts +5 -4
- package/dist/plugins/ops/transcribe.js +63 -28
- package/dist/plugins/ops/translate.d.ts +2 -1
- package/dist/plugins/ops/translate.js +7 -4
- package/dist/plugins/ops/unload-model.d.ts +17 -1
- package/dist/plugins/ops/unload-model.js +32 -3
- package/dist/plugins/turbovec-backend.d.ts +1 -1
- package/dist/plugins/turbovec-backend.js +21 -6
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +1 -1
- package/dist/profiling/controller.d.ts +1 -1
- package/dist/profiling/controller.js +2 -2
- package/dist/profiling/events.d.ts +1 -1
- package/dist/profiling/events.js +2 -2
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +3 -3
- package/dist/profiling/index.d.ts +13 -13
- package/dist/profiling/index.js +12 -12
- package/dist/profiling/operation-metrics.d.ts +1 -1
- package/dist/profiling/operation-metrics.js +24 -21
- package/dist/profiling/operation-wrappers.js +3 -3
- package/dist/profiling/profiler.js +1 -1
- package/dist/rag/embedding-scope.d.ts +16 -0
- package/dist/rag/embedding-scope.js +81 -0
- package/dist/rag/handler.d.ts +25 -0
- package/dist/rag/handler.js +51 -17
- package/dist/rag/handlers/close-workspace.js +1 -1
- package/dist/rag/handlers/delete-embeddings.js +1 -1
- package/dist/rag/handlers/delete-workspace.js +1 -1
- package/dist/rag/handlers/ingest.js +3 -7
- package/dist/rag/handlers/list-workspaces.d.ts +1 -1
- package/dist/rag/handlers/list-workspaces.js +1 -1
- package/dist/rag/handlers/reindex.js +1 -1
- package/dist/rag/handlers/save-embeddings.js +1 -1
- package/dist/rag/handlers/search.d.ts +10 -1
- package/dist/rag/handlers/search.js +17 -8
- package/dist/rag/index.d.ts +11 -11
- package/dist/rag/index.js +11 -11
- package/dist/rag/rag-operation-manager.d.ts +27 -3
- package/dist/rag/rag-operation-manager.js +10 -27
- package/dist/rag/rag-workspace-manager.js +1 -1
- package/dist/registry.js +7 -1
- package/dist/resources/collector.d.ts +71 -37
- package/dist/resources/collector.js +9 -2
- package/dist/resources/instance.d.ts +1 -1
- package/dist/resources/instance.js +1 -1
- package/dist/resources/native.d.ts +1 -1
- package/dist/resources/normalize.d.ts +1 -1
- package/dist/resources/types.d.ts +2 -0
- package/dist/rpc/inventory.js +1 -12
- package/dist/runtime/env.d.ts +5 -1
- package/dist/runtime/env.js +6 -21
- package/dist/runtime/index.d.ts +8 -5
- package/dist/runtime/index.js +4 -2
- package/dist/runtime/lifecycle.d.ts +6 -4
- package/dist/runtime/lifecycle.js +16 -12
- package/dist/runtime/model-config-utils.js +8 -1
- package/dist/runtime/model-registry.d.ts +30 -4
- package/dist/runtime/model-registry.js +48 -2
- package/dist/runtime/model-work-lock.d.ts +13 -0
- package/dist/runtime/model-work-lock.js +48 -0
- package/dist/runtime/registry-client.d.ts +47 -1
- package/dist/runtime/registry-client.js +446 -88
- package/dist/runtime/request-context.d.ts +11 -3
- package/dist/runtime/request-context.js +39 -2
- package/dist/runtime/request-registry.d.ts +56 -8
- package/dist/runtime/request-registry.js +190 -72
- package/dist/runtime/runtime-lifecycle.js +10 -1
- package/dist/runtime/session-id.d.ts +18 -0
- package/dist/runtime/session-id.js +20 -0
- package/dist/runtime/session-registry.d.ts +39 -0
- package/dist/runtime/session-registry.js +114 -0
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +2 -2
- package/dist/runtime/vector-index-backend.d.ts +6 -2
- package/dist/runtime/vector-index-registry.d.ts +26 -5
- package/dist/runtime/vector-index-registry.js +88 -27
- package/dist/schemas/abort-signal.d.ts +8 -0
- package/dist/schemas/assess-model-fit.d.ts +138 -282
- package/dist/schemas/assess-model-fit.js +85 -219
- package/dist/schemas/audio-gen.d.ts +291 -25
- package/dist/schemas/audio-gen.js +130 -26
- package/dist/schemas/batch-completion-stream.d.ts +113 -15
- package/dist/schemas/batch-completion-stream.js +10 -6
- package/dist/schemas/bci-config.d.ts +3 -1
- package/dist/schemas/bci-config.js +2 -2
- package/dist/schemas/bci.d.ts +55 -4
- package/dist/schemas/bci.js +13 -18
- package/dist/schemas/calc-tokens.d.ts +141 -0
- package/dist/schemas/calc-tokens.js +53 -0
- package/dist/schemas/cancel.d.ts +31 -0
- package/dist/schemas/cancel.js +11 -2
- package/dist/schemas/classification.d.ts +3 -0
- package/dist/schemas/classification.js +6 -2
- package/dist/schemas/common.d.ts +2209 -348
- package/dist/schemas/common.js +52 -33
- package/dist/schemas/completion-event.d.ts +11 -2
- package/dist/schemas/completion-event.js +5 -2
- package/dist/schemas/completion-stream.d.ts +173 -19
- package/dist/schemas/completion-stream.js +117 -20
- package/dist/schemas/config.d.ts +2064 -178
- package/dist/schemas/config.js +21 -23
- package/dist/schemas/decision.d.ts +12 -2
- package/dist/schemas/decision.js +16 -1
- package/dist/schemas/download-asset.d.ts +13 -6
- package/dist/schemas/download-asset.js +4 -7
- package/dist/schemas/embed.d.ts +286 -3
- package/dist/schemas/embed.js +162 -16
- package/dist/schemas/engine-addon-map.d.ts +3 -1
- package/dist/schemas/engine-addon-map.js +5 -3
- package/dist/schemas/errors.d.ts +13 -0
- package/dist/schemas/errors.js +71 -1
- package/dist/schemas/finetune.d.ts +14 -4
- package/dist/schemas/finetune.js +5 -6
- package/dist/schemas/heartbeat.d.ts +1 -0
- package/dist/schemas/heartbeat.js +5 -2
- package/dist/schemas/image-embedding.d.ts +27 -0
- package/dist/schemas/image-embedding.js +107 -0
- package/dist/schemas/index.d.ts +55 -50
- package/dist/schemas/index.js +54 -49
- package/dist/schemas/lifecycle.d.ts +3 -0
- package/dist/schemas/lifecycle.js +13 -6
- package/dist/schemas/llamacpp-config.d.ts +443 -20
- package/dist/schemas/llamacpp-config.js +188 -14
- package/dist/schemas/load-model.d.ts +8940 -1952
- package/dist/schemas/load-model.js +73 -9
- package/dist/schemas/logging-stream.d.ts +1 -0
- package/dist/schemas/logging-stream.js +5 -2
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-config-schemas.d.ts +731 -111
- package/dist/schemas/model-config-schemas.js +16 -12
- package/dist/schemas/model-fit-policy.d.ts +2 -2
- package/dist/schemas/model-info.d.ts +54 -56
- package/dist/schemas/model-info.js +18 -7
- package/dist/schemas/model-ops.d.ts +12 -0
- package/dist/schemas/model-ops.js +33 -5
- package/dist/schemas/model-src-utils.d.ts +14 -6
- package/dist/schemas/model-src-utils.js +2 -2
- package/dist/schemas/model-types.d.ts +12 -4
- package/dist/schemas/model-types.js +2 -0
- package/dist/schemas/ocr.d.ts +11 -4
- package/dist/schemas/ocr.js +7 -3
- package/dist/schemas/plugin.d.ts +70 -8
- package/dist/schemas/plugin.js +32 -4
- package/dist/schemas/profiling.d.ts +32 -32
- package/dist/schemas/profiling.js +1 -1
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +11 -17
- package/dist/schemas/registry.d.ts +38 -10
- package/dist/schemas/registry.js +16 -7
- package/dist/schemas/reload-config.d.ts +45 -6
- package/dist/schemas/reload-config.js +13 -6
- package/dist/schemas/request-base.d.ts +39 -0
- package/dist/schemas/request-base.js +64 -0
- package/dist/schemas/rerank.d.ts +132 -0
- package/dist/schemas/rerank.js +104 -0
- package/dist/schemas/rpc-server.d.ts +3 -0
- package/dist/schemas/rpc-server.js +15 -15
- package/dist/schemas/sdcpp-config.d.ts +144 -18
- package/dist/schemas/sdcpp-config.js +123 -28
- package/dist/schemas/session.d.ts +37 -0
- package/dist/schemas/session.js +53 -0
- package/dist/schemas/system-resources.d.ts +364 -179
- package/dist/schemas/system-resources.js +8 -3
- package/dist/schemas/text-to-speech.d.ts +1408 -275
- package/dist/schemas/text-to-speech.js +547 -33
- package/dist/schemas/tools.d.ts +7 -0
- package/dist/schemas/tools.js +29 -0
- package/dist/schemas/transcription-config.d.ts +267 -2
- package/dist/schemas/transcription-config.js +138 -7
- package/dist/schemas/transcription.d.ts +94 -7
- package/dist/schemas/transcription.js +99 -22
- package/dist/schemas/translate.d.ts +4 -2
- package/dist/schemas/translate.js +6 -10
- package/dist/schemas/translation-config.d.ts +40 -20
- package/dist/schemas/translation-config.js +1 -1
- package/dist/schemas/tts-pcm.d.ts +35 -0
- package/dist/schemas/tts-pcm.js +69 -0
- package/dist/schemas/vector-index.d.ts +47 -1
- package/dist/schemas/vector-index.js +37 -10
- package/dist/schemas/vla.d.ts +3 -3
- package/dist/surface.d.ts +4 -3
- package/dist/surface.js +4 -3
- package/dist/utils/addon-responses.d.ts +71 -2
- package/dist/utils/aggregate-events.d.ts +1 -1
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/archive.d.ts +7 -0
- package/dist/utils/archive.js +89 -30
- package/dist/utils/asr-events.d.ts +5 -0
- package/dist/utils/asr-events.js +10 -1
- package/dist/utils/audio/decoder.js +3 -1
- package/dist/utils/audio-input.js +1 -1
- package/dist/utils/cache/auto-history.d.ts +2 -1
- package/dist/utils/cache/auto-history.js +5 -3
- package/dist/utils/cache/layout.d.ts +48 -0
- package/dist/utils/cache/layout.js +190 -0
- package/dist/utils/cache/paths.js +8 -10
- package/dist/utils/cache/types.d.ts +2 -1
- package/dist/utils/checksum.d.ts +7 -0
- package/dist/utils/checksum.js +59 -2
- package/dist/utils/completion-normalizer.js +287 -88
- package/dist/utils/gguf-architecture.d.ts +7 -0
- package/dist/utils/gguf-architecture.js +142 -0
- package/dist/utils/gguf-tensor-extractor.d.ts +0 -6
- package/dist/utils/gguf-tensor-extractor.js +1 -50
- package/dist/utils/index.d.ts +13 -13
- package/dist/utils/index.js +13 -13
- package/dist/utils/mcp-adapter.d.ts +1 -1
- package/dist/utils/mcp-adapter.js +1 -1
- package/dist/utils/path-security.js +1 -1
- package/dist/utils/shard-utils.d.ts +0 -16
- package/dist/utils/shard-utils.js +14 -48
- package/dist/utils/tool-integration.d.ts +3 -2
- package/dist/utils/tool-integration.js +3 -6
- package/dist/utils/tools/defer.d.ts +50 -31
- package/dist/utils/tools/defer.js +115 -51
- package/dist/utils/tools/dialect.d.ts +15 -4
- package/dist/utils/tools/dialect.js +34 -5
- package/dist/utils/tools/index.d.ts +3 -3
- package/dist/utils/tools/index.js +3 -3
- package/dist/utils/tools/parser.js +8 -8
- package/dist/utils/tools/parsers/dsml.d.ts +1 -1
- package/dist/utils/tools/parsers/dsml.js +1 -1
- package/dist/utils/tools/parsers/gemma4native.d.ts +1 -1
- package/dist/utils/tools/parsers/gemma4native.js +1 -1
- package/dist/utils/tools/parsers/harmony.d.ts +1 -1
- package/dist/utils/tools/parsers/harmony.js +1 -1
- package/dist/utils/tools/parsers/hermes.d.ts +1 -1
- package/dist/utils/tools/parsers/hermes.js +1 -1
- package/dist/utils/tools/parsers/json.d.ts +1 -1
- package/dist/utils/tools/parsers/json.js +1 -1
- package/dist/utils/tools/parsers/pythonic.d.ts +1 -1
- package/dist/utils/tools/parsers/pythonic.js +1 -1
- package/dist/utils/tools/parsers/qwen35.d.ts +1 -1
- package/dist/utils/tools/parsers/qwen35.js +1 -1
- package/dist/utils/transcribe-metadata.d.ts +28 -2
- package/dist/utils/transcribe-metadata.js +16 -0
- package/dist/utils/tts-stats.d.ts +43 -1
- package/dist/utils/tts-stats.js +120 -22
- package/dist/utils/until-aborted.d.ts +7 -0
- package/dist/utils/until-aborted.js +34 -0
- package/package.json +67 -55
- package/dist/models/registry/resource-profiles.d.ts +0 -17
- package/dist/models/registry/resource-profiles.js +0 -5657
- package/dist/resources/model-fit/assess.d.ts +0 -72
- package/dist/resources/model-fit/assess.js +0 -679
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.d.ts +0 -27
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +0 -33
- package/dist/resources/model-fit/floor.d.ts +0 -31
- package/dist/resources/model-fit/floor.js +0 -65
- package/dist/resources/model-fit/kv-cache.d.ts +0 -23
- package/dist/resources/model-fit/kv-cache.js +0 -85
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +0 -54
- package/dist/resources/model-fit/native-probe/advisory-fit.js +0 -248
- package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +0 -2
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +0 -49
- package/dist/resources/model-fit/native-probe/classify-fit.d.ts +0 -6
- package/dist/resources/model-fit/native-probe/classify-fit.js +0 -166
- package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +0 -31
- package/dist/resources/model-fit/native-probe/create-fit-request.js +0 -61
- package/dist/resources/model-fit/native-probe/engine-fit.d.ts +0 -73
- package/dist/resources/model-fit/native-probe/engine-fit.js +0 -13
- package/dist/resources/model-fit/native-probe/engines/asr.d.ts +0 -14
- package/dist/resources/model-fit/native-probe/engines/asr.js +0 -126
- package/dist/resources/model-fit/native-probe/engines/audiogen.d.ts +0 -8
- package/dist/resources/model-fit/native-probe/engines/diffusion.d.ts +0 -7
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +0 -65
- package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -12
- package/dist/resources/model-fit/native-probe/engines/llama.js +0 -41
- package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +0 -8
- package/dist/resources/model-fit/native-probe/engines/nmt.js +0 -11
- package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +0 -9
- package/dist/resources/model-fit/native-probe/engines/ocr.js +0 -13
- package/dist/resources/model-fit/native-probe/engines/tts.d.ts +0 -10
- package/dist/resources/model-fit/native-probe/engines/tts.js +0 -152
- package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +0 -16
- package/dist/resources/model-fit/native-probe/fit-process.d.ts +0 -27
- package/dist/resources/model-fit/native-probe/fit-process.js +0 -55
- package/dist/resources/model-fit/native-probe/fit-runner.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/fit-runner.js +0 -58
- package/dist/resources/model-fit/native-probe/run-fit.d.ts +0 -24
- package/dist/resources/model-fit/native-probe/run-fit.js +0 -20
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +0 -24
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +0 -123
- package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +0 -63
- package/dist/resources/model-fit/native-probe/run-isolated-fit.js +0 -377
- package/dist/resources/model-fit/platform.d.ts +0 -9
- package/dist/resources/model-fit/platform.js +0 -26
- package/dist/resources/model-fit/types.d.ts +0 -6
- package/dist/resources/model-fit/types.js +0 -1
- package/dist/schemas/model-resource-profile.d.ts +0 -108
- package/dist/schemas/model-resource-profile.js +0 -80
- /package/dist/{resources/model-fit/native-probe/engines → model-fit}/gpu.d.ts +0 -0
- /package/dist/{resources/model-fit/native-probe/engines → model-fit}/gpu.js +0 -0
- /package/dist/{resources/model-fit/native-probe/fit-outcome.js → schemas/abort-signal.js} +0 -0
package/dist/schemas/common.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { startRpcServerRequestSchema, startRpcServerResponseSchema, stopRpcServerRequestSchema, stopRpcServerResponseSchema, discoverRpcServersRequestSchema, discoverRpcServersResponseSchema } from '
|
|
1
|
+
import { startRpcServerRequestSchema, startRpcServerResponseSchema, stopRpcServerRequestSchema, stopRpcServerResponseSchema, discoverRpcServersRequestSchema, discoverRpcServersResponseSchema } from '../schemas/rpc-server.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { perCallProfilingSchema } from '
|
|
4
|
-
import { heartbeatRequestSchema, heartbeatResponseSchema } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
3
|
+
import { perCallProfilingSchema } from '../schemas/profiling.js';
|
|
4
|
+
import { heartbeatRequestSchema, heartbeatResponseSchema } from '../schemas/heartbeat.js';
|
|
5
|
+
import { openSessionRequestSchema, openSessionResponseSchema, closeSessionRequestSchema, closeSessionResponseSchema } from '../schemas/session.js';
|
|
6
|
+
import { completionOrchestrateRequestSchema, completionOrchestrateResponseSchema, completionStreamRequestSchema, completionStreamResponseSchema } from '../schemas/completion-stream.js';
|
|
7
|
+
import { batchCompletionStreamRequestSchema, batchCompletionStreamResponseSchema } from '../schemas/batch-completion-stream.js';
|
|
8
|
+
import { loadModelRequestSchema, loadModelResponseSchema, modelProgressUpdateSchema } from '../schemas/load-model.js';
|
|
9
|
+
import { downloadAssetRequestSchema, downloadAssetResponseSchema } from '../schemas/download-asset.js';
|
|
10
|
+
import { unloadModelRequestSchema, unloadModelResponseSchema, deleteCacheRequestSchema, deleteCacheResponseSchema } from '../schemas/model-ops.js';
|
|
11
|
+
import { transcribeRequestSchema, transcribeResponseSchema, transcribeStreamRequestSchema, transcribeStreamResponseSchema } from '../schemas/transcription.js';
|
|
12
|
+
import { bciTranscribeRequestSchema, bciTranscribeResponseSchema, bciTranscribeStreamRequestSchema, bciTranscribeStreamResponseSchema } from '../schemas/bci.js';
|
|
13
|
+
import { embedRequestSchema, embedResponseSchema, embedBatchRequestSchema, embedBatchResponseSchema } from '../schemas/embed.js';
|
|
14
|
+
import { cancelRequestSchema, cancelResponseSchema } from '../schemas/cancel.js';
|
|
15
|
+
import { translateRequestSchema, translateResponseSchema } from '../schemas/translate.js';
|
|
16
|
+
import { loggingStreamRequestSchema, loggingStreamResponseSchema } from '../schemas/logging-stream.js';
|
|
17
|
+
import { ttsRequestSchema, ttsResponseSchema, textToSpeechStreamRequestSchema, textToSpeechStreamResponseSchema } from '../schemas/text-to-speech.js';
|
|
18
|
+
import { errorResponseSchema } from '../schemas/error.js';
|
|
19
|
+
import { ragRequestSchema, ragResponseSchema, ragProgressUpdateSchema } from '../schemas/rag.js';
|
|
20
|
+
import { vectorIndexRequestSchema, vectorIndexResponseSchema } from '../schemas/vector-index.js';
|
|
21
|
+
import { getModelInfoRequestSchema, getModelInfoResponseSchema, getLoadedModelInfoRequestSchema, getLoadedModelInfoResponseSchema } from '../schemas/model-info.js';
|
|
22
|
+
import { getSystemResourcesRequestSchema, getSystemResourcesResponseSchema } from '../schemas/system-resources.js';
|
|
23
|
+
import { assessModelFitRequestSchema, assessModelFitResponseSchema } from '../schemas/assess-model-fit.js';
|
|
24
|
+
import { ocrStreamRequestSchema, ocrStreamResponseSchema } from '../schemas/ocr.js';
|
|
25
|
+
import { diffusionStreamRequestSchema, diffusionStreamResponseSchema, videoStreamRequestSchema, videoStreamResponseSchema, upscaleStreamRequestSchema, upscaleStreamResponseSchema, worldSceneStreamRequestSchema, worldSceneStreamResponseSchema, worldStepStreamRequestSchema, worldStepStreamResponseSchema } from '../schemas/sdcpp-config.js';
|
|
26
|
+
import { finetuneRequestSchema, finetuneResponseSchema, finetuneProgressResponseSchema } from '../schemas/finetune.js';
|
|
27
|
+
import { pluginInvokeRequestSchema, pluginInvokeResponseSchema, pluginInvokeStreamRequestSchema, pluginInvokeStreamResponseSchema } from '../schemas/plugin.js';
|
|
28
|
+
import { modelRegistryListRequestSchema, modelRegistryListResponseSchema, modelRegistrySearchRequestSchema, modelRegistrySearchResponseSchema, modelRegistryGetModelRequestSchema, modelRegistryGetModelResponseSchema } from '../schemas/registry.js';
|
|
29
|
+
import { suspendRequestSchema, suspendResponseSchema, resumeRequestSchema, resumeResponseSchema, stateRequestSchema, stateResponseSchema } from '../schemas/lifecycle.js';
|
|
30
|
+
import { decideRequestSchema, decideResponseSchema } from '../schemas/decision.js';
|
|
31
|
+
import { rerankRequestSchema, rerankResponseSchema } from '../schemas/rerank.js';
|
|
32
|
+
import { classifyRequestSchema, classifyResponseSchema } from '../schemas/classification.js';
|
|
33
|
+
import { calcTokensRequestSchema, calcTokensResponseSchema } from '../schemas/calc-tokens.js';
|
|
34
|
+
import { audioEditStreamRequestSchema, audioEditStreamResponseSchema, audioGenStreamRequestSchema, audioGenStreamResponseSchema, audioUnderstandRequestSchema, audioUnderstandResponseSchema } from '../schemas/audio-gen.js';
|
|
32
35
|
export const requestSchema = z.union([
|
|
33
36
|
audioGenStreamRequestSchema,
|
|
34
37
|
audioEditStreamRequestSchema,
|
|
@@ -37,6 +40,9 @@ export const requestSchema = z.union([
|
|
|
37
40
|
stopRpcServerRequestSchema,
|
|
38
41
|
discoverRpcServersRequestSchema,
|
|
39
42
|
heartbeatRequestSchema,
|
|
43
|
+
calcTokensRequestSchema,
|
|
44
|
+
openSessionRequestSchema,
|
|
45
|
+
closeSessionRequestSchema,
|
|
40
46
|
loadModelRequestSchema,
|
|
41
47
|
downloadAssetRequestSchema,
|
|
42
48
|
completionStreamRequestSchema,
|
|
@@ -49,6 +55,7 @@ export const requestSchema = z.union([
|
|
|
49
55
|
bciTranscribeStreamRequestSchema,
|
|
50
56
|
loggingStreamRequestSchema,
|
|
51
57
|
embedRequestSchema,
|
|
58
|
+
embedBatchRequestSchema,
|
|
52
59
|
translateRequestSchema,
|
|
53
60
|
ttsRequestSchema,
|
|
54
61
|
textToSpeechStreamRequestSchema,
|
|
@@ -76,7 +83,8 @@ export const requestSchema = z.union([
|
|
|
76
83
|
resumeRequestSchema,
|
|
77
84
|
stateRequestSchema,
|
|
78
85
|
classifyRequestSchema,
|
|
79
|
-
decideRequestSchema
|
|
86
|
+
decideRequestSchema,
|
|
87
|
+
rerankRequestSchema
|
|
80
88
|
]);
|
|
81
89
|
export const responseSchema = z.discriminatedUnion('type', [
|
|
82
90
|
audioGenStreamResponseSchema,
|
|
@@ -86,6 +94,9 @@ export const responseSchema = z.discriminatedUnion('type', [
|
|
|
86
94
|
stopRpcServerResponseSchema,
|
|
87
95
|
discoverRpcServersResponseSchema,
|
|
88
96
|
heartbeatResponseSchema,
|
|
97
|
+
calcTokensResponseSchema,
|
|
98
|
+
openSessionResponseSchema,
|
|
99
|
+
closeSessionResponseSchema,
|
|
89
100
|
loadModelResponseSchema,
|
|
90
101
|
downloadAssetResponseSchema,
|
|
91
102
|
completionStreamResponseSchema,
|
|
@@ -99,6 +110,7 @@ export const responseSchema = z.discriminatedUnion('type', [
|
|
|
99
110
|
bciTranscribeStreamResponseSchema,
|
|
100
111
|
loggingStreamResponseSchema,
|
|
101
112
|
embedResponseSchema,
|
|
113
|
+
embedBatchResponseSchema,
|
|
102
114
|
translateResponseSchema,
|
|
103
115
|
ttsResponseSchema,
|
|
104
116
|
textToSpeechStreamResponseSchema,
|
|
@@ -129,7 +141,8 @@ export const responseSchema = z.discriminatedUnion('type', [
|
|
|
129
141
|
resumeResponseSchema,
|
|
130
142
|
stateResponseSchema,
|
|
131
143
|
classifyResponseSchema,
|
|
132
|
-
decideResponseSchema
|
|
144
|
+
decideResponseSchema,
|
|
145
|
+
rerankResponseSchema
|
|
133
146
|
]);
|
|
134
147
|
export const rpcOptionsSchema = z.object({
|
|
135
148
|
timeout: z
|
|
@@ -148,5 +161,11 @@ export const rpcOptionsSchema = z.object({
|
|
|
148
161
|
.describe('When `true`, skip any cached RPC connection and open a fresh one for this call.'),
|
|
149
162
|
profiling: perCallProfilingSchema
|
|
150
163
|
.optional()
|
|
151
|
-
.describe('Per-call profiler configuration; when present, overrides the global profiler settings for this request.')
|
|
164
|
+
.describe('Per-call profiler configuration; when present, overrides the global profiler settings for this request.'),
|
|
165
|
+
sessionId: z
|
|
166
|
+
.string()
|
|
167
|
+
.min(1)
|
|
168
|
+
.optional()
|
|
169
|
+
.describe('Caller session to run this request as. Set by a session handle; the ' +
|
|
170
|
+
'transport copies it onto the request body.')
|
|
152
171
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type Tool, type ToolCallError, type ToolCallWithCall } from '
|
|
3
|
-
import type { ToolDialect } from '
|
|
2
|
+
import { type Tool, type ToolCallError, type ToolCallWithCall } from '../schemas/tools.js';
|
|
3
|
+
import type { ToolDialect } from '../schemas/completion-stream.js';
|
|
4
4
|
export declare const completionStatsSchema: z.ZodObject<{
|
|
5
5
|
timeToFirstToken: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11,9 +11,12 @@ export declare const completionStatsSchema: z.ZodObject<{
|
|
|
11
11
|
emittedTokens: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
draftTokens: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
draftAcceptedTokens: z.ZodOptional<z.ZodNumber>;
|
|
14
16
|
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
15
17
|
cpu: "cpu";
|
|
16
18
|
gpu: "gpu";
|
|
19
|
+
npu: "npu";
|
|
17
20
|
}>>;
|
|
18
21
|
}, z.core.$strip>;
|
|
19
22
|
export type CompletionStats = z.infer<typeof completionStatsSchema>;
|
|
@@ -69,9 +72,12 @@ export declare const statsEventSchema: z.ZodObject<{
|
|
|
69
72
|
emittedTokens: z.ZodOptional<z.ZodNumber>;
|
|
70
73
|
avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
|
|
71
74
|
toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
draftTokens: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
draftAcceptedTokens: z.ZodOptional<z.ZodNumber>;
|
|
72
77
|
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
73
78
|
cpu: "cpu";
|
|
74
79
|
gpu: "gpu";
|
|
80
|
+
npu: "npu";
|
|
75
81
|
}>>;
|
|
76
82
|
}, z.core.$strip>;
|
|
77
83
|
}, z.core.$strip>;
|
|
@@ -153,9 +159,12 @@ export declare const completionEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
153
159
|
emittedTokens: z.ZodOptional<z.ZodNumber>;
|
|
154
160
|
avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
|
|
155
161
|
toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
draftTokens: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
draftAcceptedTokens: z.ZodOptional<z.ZodNumber>;
|
|
156
164
|
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
157
165
|
cpu: "cpu";
|
|
158
166
|
gpu: "gpu";
|
|
167
|
+
npu: "npu";
|
|
159
168
|
}>>;
|
|
160
169
|
}, z.core.$strip>;
|
|
161
170
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { toolCallSchema, toolCallErrorSchema } from '
|
|
2
|
+
import { toolCallSchema, toolCallErrorSchema } from '../schemas/tools.js';
|
|
3
3
|
export const completionStatsSchema = z.object({
|
|
4
4
|
timeToFirstToken: z.number().optional(),
|
|
5
5
|
tokensPerSecond: z.number().optional(),
|
|
@@ -14,7 +14,10 @@ export const completionStatsSchema = z.object({
|
|
|
14
14
|
// Prompt renders that provably left the request's tool definitions out.
|
|
15
15
|
// Non-zero means the model never saw them; 0 is not proof it saw them all.
|
|
16
16
|
toolDefinitionsDropped: z.number().optional(),
|
|
17
|
-
|
|
17
|
+
// Speculative decoding (`spec_type`): draft tokens proposed, and accepted.
|
|
18
|
+
draftTokens: z.number().optional(),
|
|
19
|
+
draftAcceptedTokens: z.number().optional(),
|
|
20
|
+
backendDevice: z.enum(['cpu', 'gpu', 'npu']).optional()
|
|
18
21
|
});
|
|
19
22
|
export const seqSchema = z.number().int().nonnegative();
|
|
20
23
|
export const contentDeltaEventSchema = z.object({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export { completionStatsSchema, type CompletionStats } from '
|
|
2
|
+
export { completionStatsSchema, type CompletionStats } from '../schemas/completion-event.js';
|
|
3
3
|
/**
|
|
4
|
-
* Tool-call output dialect.
|
|
4
|
+
* Tool-call output dialect. Detected at load from the model name, then from the
|
|
5
|
+
* GGUF `general.architecture`, then `"hermes"`; pass via
|
|
5
6
|
* `completion({ toolDialect })` to override.
|
|
6
7
|
*
|
|
7
8
|
* Expected raw model output per dialect:
|
|
@@ -26,6 +27,21 @@ export declare const toolDialectSchema: z.ZodEnum<{
|
|
|
26
27
|
export declare const attachmentSchema: z.ZodObject<{
|
|
27
28
|
path: z.ZodString;
|
|
28
29
|
}, z.core.$strip>;
|
|
30
|
+
/**
|
|
31
|
+
* One ordered piece of a message's `content`. A media part keeps its place in
|
|
32
|
+
* the turn, so text that refers to "this image" sits next to it; `attachments`
|
|
33
|
+
* cannot express that because every attachment is sent before the text.
|
|
34
|
+
*/
|
|
35
|
+
export declare const historyContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<"text">;
|
|
37
|
+
text: z.ZodString;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"media">;
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
}, z.core.$strict>], "type">;
|
|
42
|
+
export type HistoryContentPart = z.infer<typeof historyContentPartSchema>;
|
|
43
|
+
/** A message's content: plain text, or ordered text/media parts. */
|
|
44
|
+
export type HistoryContent = string | HistoryContentPart[];
|
|
29
45
|
export declare const generationParamsSchema: z.ZodObject<{
|
|
30
46
|
temp: z.ZodOptional<z.ZodNumber>;
|
|
31
47
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
@@ -76,7 +92,13 @@ export declare const responseFormatSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
76
92
|
}, z.core.$strict>], "type">;
|
|
77
93
|
export declare const historyMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
78
94
|
role: z.ZodString;
|
|
79
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
95
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"text">;
|
|
97
|
+
text: z.ZodString;
|
|
98
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"media">;
|
|
100
|
+
path: z.ZodString;
|
|
101
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
80
102
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
103
|
path: z.ZodString;
|
|
82
104
|
}, z.core.$strip>>>;
|
|
@@ -88,7 +110,13 @@ export declare const historyMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
|
88
110
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
89
111
|
toolName: z.ZodOptional<z.ZodString>;
|
|
90
112
|
}, z.core.$strip>, z.ZodTransform<{
|
|
91
|
-
content: string
|
|
113
|
+
content: string | ({
|
|
114
|
+
type: "text";
|
|
115
|
+
text: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: "media";
|
|
118
|
+
path: string;
|
|
119
|
+
})[];
|
|
92
120
|
role: string;
|
|
93
121
|
attachments?: {
|
|
94
122
|
path: string;
|
|
@@ -102,7 +130,13 @@ export declare const historyMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
|
102
130
|
toolName?: string | undefined;
|
|
103
131
|
}, {
|
|
104
132
|
role: string;
|
|
105
|
-
content?: string |
|
|
133
|
+
content?: string | ({
|
|
134
|
+
type: "text";
|
|
135
|
+
text: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "media";
|
|
138
|
+
path: string;
|
|
139
|
+
})[] | null | undefined;
|
|
106
140
|
attachments?: {
|
|
107
141
|
path: string;
|
|
108
142
|
}[] | undefined;
|
|
@@ -114,11 +148,37 @@ export declare const historyMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
|
114
148
|
toolCallId?: string | undefined;
|
|
115
149
|
toolName?: string | undefined;
|
|
116
150
|
}>>;
|
|
151
|
+
export declare const historyMessageWithoutAttachmentsSchema: z.ZodObject<{
|
|
152
|
+
role: z.ZodString;
|
|
153
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
+
id: z.ZodOptional<z.ZodString>;
|
|
155
|
+
name: z.ZodString;
|
|
156
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
157
|
+
}, z.core.$strip>>>;
|
|
158
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
159
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
160
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"text">;
|
|
162
|
+
text: z.ZodString;
|
|
163
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
164
|
+
type: z.ZodLiteral<"media">;
|
|
165
|
+
path: z.ZodString;
|
|
166
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
167
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
path: z.ZodString;
|
|
169
|
+
}, z.core.$strip>>>;
|
|
170
|
+
}, z.core.$strip>;
|
|
117
171
|
export type HistoryMessage = z.infer<typeof historyMessageSchema>;
|
|
118
172
|
export declare const completionParamsSchema: z.ZodObject<{
|
|
119
173
|
history: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
120
174
|
role: z.ZodString;
|
|
121
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
175
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<"text">;
|
|
177
|
+
text: z.ZodString;
|
|
178
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<"media">;
|
|
180
|
+
path: z.ZodString;
|
|
181
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
122
182
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
183
|
path: z.ZodString;
|
|
124
184
|
}, z.core.$strip>>>;
|
|
@@ -130,7 +190,13 @@ export declare const completionParamsSchema: z.ZodObject<{
|
|
|
130
190
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
131
191
|
toolName: z.ZodOptional<z.ZodString>;
|
|
132
192
|
}, z.core.$strip>, z.ZodTransform<{
|
|
133
|
-
content: string
|
|
193
|
+
content: string | ({
|
|
194
|
+
type: "text";
|
|
195
|
+
text: string;
|
|
196
|
+
} | {
|
|
197
|
+
type: "media";
|
|
198
|
+
path: string;
|
|
199
|
+
})[];
|
|
134
200
|
role: string;
|
|
135
201
|
attachments?: {
|
|
136
202
|
path: string;
|
|
@@ -144,7 +210,13 @@ export declare const completionParamsSchema: z.ZodObject<{
|
|
|
144
210
|
toolName?: string | undefined;
|
|
145
211
|
}, {
|
|
146
212
|
role: string;
|
|
147
|
-
content?: string |
|
|
213
|
+
content?: string | ({
|
|
214
|
+
type: "text";
|
|
215
|
+
text: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: "media";
|
|
218
|
+
path: string;
|
|
219
|
+
})[] | null | undefined;
|
|
148
220
|
attachments?: {
|
|
149
221
|
path: string;
|
|
150
222
|
}[] | undefined;
|
|
@@ -158,11 +230,19 @@ export declare const completionParamsSchema: z.ZodObject<{
|
|
|
158
230
|
}>>>;
|
|
159
231
|
modelId: z.ZodString;
|
|
160
232
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
233
|
+
prefill: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
seedFrom: z.ZodOptional<z.ZodString>;
|
|
161
235
|
}, z.core.$strip>;
|
|
162
236
|
export declare const completionClientParamsSchema: z.ZodObject<{
|
|
163
237
|
history: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
164
238
|
role: z.ZodString;
|
|
165
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
239
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
240
|
+
type: z.ZodLiteral<"text">;
|
|
241
|
+
text: z.ZodString;
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
243
|
+
type: z.ZodLiteral<"media">;
|
|
244
|
+
path: z.ZodString;
|
|
245
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
166
246
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
167
247
|
path: z.ZodString;
|
|
168
248
|
}, z.core.$strip>>>;
|
|
@@ -174,7 +254,13 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
174
254
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
175
255
|
toolName: z.ZodOptional<z.ZodString>;
|
|
176
256
|
}, z.core.$strip>, z.ZodTransform<{
|
|
177
|
-
content: string
|
|
257
|
+
content: string | ({
|
|
258
|
+
type: "text";
|
|
259
|
+
text: string;
|
|
260
|
+
} | {
|
|
261
|
+
type: "media";
|
|
262
|
+
path: string;
|
|
263
|
+
})[];
|
|
178
264
|
role: string;
|
|
179
265
|
attachments?: {
|
|
180
266
|
path: string;
|
|
@@ -188,7 +274,13 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
188
274
|
toolName?: string | undefined;
|
|
189
275
|
}, {
|
|
190
276
|
role: string;
|
|
191
|
-
content?: string |
|
|
277
|
+
content?: string | ({
|
|
278
|
+
type: "text";
|
|
279
|
+
text: string;
|
|
280
|
+
} | {
|
|
281
|
+
type: "media";
|
|
282
|
+
path: string;
|
|
283
|
+
})[] | null | undefined;
|
|
192
284
|
attachments?: {
|
|
193
285
|
path: string;
|
|
194
286
|
}[] | undefined;
|
|
@@ -201,6 +293,8 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
201
293
|
toolName?: string | undefined;
|
|
202
294
|
}>>>;
|
|
203
295
|
modelId: z.ZodString;
|
|
296
|
+
prefill: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
+
seedFrom: z.ZodOptional<z.ZodString>;
|
|
204
298
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
205
299
|
type: z.ZodLiteral<"function">;
|
|
206
300
|
name: z.ZodString;
|
|
@@ -233,6 +327,10 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
233
327
|
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
328
|
}, z.core.$loose>;
|
|
235
329
|
}, z.core.$strip>>>;
|
|
330
|
+
toolSearch: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
defaultLimit: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
maxLimit: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
}, z.core.$strict>>;
|
|
236
334
|
stream: z.ZodBoolean;
|
|
237
335
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
238
336
|
generationParams: z.ZodOptional<z.ZodObject<{
|
|
@@ -277,7 +375,13 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
277
375
|
export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
278
376
|
history: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
279
377
|
role: z.ZodString;
|
|
280
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
378
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
379
|
+
type: z.ZodLiteral<"text">;
|
|
380
|
+
text: z.ZodString;
|
|
381
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
382
|
+
type: z.ZodLiteral<"media">;
|
|
383
|
+
path: z.ZodString;
|
|
384
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
281
385
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
386
|
path: z.ZodString;
|
|
283
387
|
}, z.core.$strip>>>;
|
|
@@ -289,7 +393,13 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
289
393
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
290
394
|
toolName: z.ZodOptional<z.ZodString>;
|
|
291
395
|
}, z.core.$strip>, z.ZodTransform<{
|
|
292
|
-
content: string
|
|
396
|
+
content: string | ({
|
|
397
|
+
type: "text";
|
|
398
|
+
text: string;
|
|
399
|
+
} | {
|
|
400
|
+
type: "media";
|
|
401
|
+
path: string;
|
|
402
|
+
})[];
|
|
293
403
|
role: string;
|
|
294
404
|
attachments?: {
|
|
295
405
|
path: string;
|
|
@@ -303,7 +413,13 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
303
413
|
toolName?: string | undefined;
|
|
304
414
|
}, {
|
|
305
415
|
role: string;
|
|
306
|
-
content?: string |
|
|
416
|
+
content?: string | ({
|
|
417
|
+
type: "text";
|
|
418
|
+
text: string;
|
|
419
|
+
} | {
|
|
420
|
+
type: "media";
|
|
421
|
+
path: string;
|
|
422
|
+
})[] | null | undefined;
|
|
307
423
|
attachments?: {
|
|
308
424
|
path: string;
|
|
309
425
|
}[] | undefined;
|
|
@@ -316,6 +432,8 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
316
432
|
toolName?: string | undefined;
|
|
317
433
|
}>>>;
|
|
318
434
|
modelId: z.ZodString;
|
|
435
|
+
prefill: z.ZodOptional<z.ZodBoolean>;
|
|
436
|
+
seedFrom: z.ZodOptional<z.ZodString>;
|
|
319
437
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
438
|
type: z.ZodLiteral<"function">;
|
|
321
439
|
name: z.ZodString;
|
|
@@ -348,6 +466,10 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
348
466
|
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
349
467
|
}, z.core.$loose>;
|
|
350
468
|
}, z.core.$strip>>>;
|
|
469
|
+
toolSearch: z.ZodOptional<z.ZodObject<{
|
|
470
|
+
defaultLimit: z.ZodOptional<z.ZodNumber>;
|
|
471
|
+
maxLimit: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
}, z.core.$strict>>;
|
|
351
473
|
stream: z.ZodBoolean;
|
|
352
474
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
353
475
|
generationParams: z.ZodOptional<z.ZodObject<{
|
|
@@ -387,8 +509,9 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
387
509
|
strict: z.ZodOptional<z.ZodBoolean>;
|
|
388
510
|
}, z.core.$strict>;
|
|
389
511
|
}, z.core.$strict>], "type">>;
|
|
390
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
391
512
|
type: z.ZodLiteral<"completionStream">;
|
|
513
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
514
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
392
515
|
}, z.core.$strip>;
|
|
393
516
|
export declare const completionStreamResponseSchema: z.ZodObject<{
|
|
394
517
|
type: z.ZodLiteral<"completionStream">;
|
|
@@ -439,9 +562,12 @@ export declare const completionStreamResponseSchema: z.ZodObject<{
|
|
|
439
562
|
emittedTokens: z.ZodOptional<z.ZodNumber>;
|
|
440
563
|
avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
|
|
441
564
|
toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
draftTokens: z.ZodOptional<z.ZodNumber>;
|
|
566
|
+
draftAcceptedTokens: z.ZodOptional<z.ZodNumber>;
|
|
442
567
|
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
443
568
|
cpu: "cpu";
|
|
444
569
|
gpu: "gpu";
|
|
570
|
+
npu: "npu";
|
|
445
571
|
}>>;
|
|
446
572
|
}, z.core.$strip>;
|
|
447
573
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -471,7 +597,13 @@ export declare const completionStreamResponseSchema: z.ZodObject<{
|
|
|
471
597
|
export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
472
598
|
history: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
473
599
|
role: z.ZodString;
|
|
474
|
-
content: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
600
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
601
|
+
type: z.ZodLiteral<"text">;
|
|
602
|
+
text: z.ZodString;
|
|
603
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
604
|
+
type: z.ZodLiteral<"media">;
|
|
605
|
+
path: z.ZodString;
|
|
606
|
+
}, z.core.$strict>], "type">>]>>>;
|
|
475
607
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
476
608
|
path: z.ZodString;
|
|
477
609
|
}, z.core.$strip>>>;
|
|
@@ -483,7 +615,13 @@ export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
|
483
615
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
484
616
|
toolName: z.ZodOptional<z.ZodString>;
|
|
485
617
|
}, z.core.$strip>, z.ZodTransform<{
|
|
486
|
-
content: string
|
|
618
|
+
content: string | ({
|
|
619
|
+
type: "text";
|
|
620
|
+
text: string;
|
|
621
|
+
} | {
|
|
622
|
+
type: "media";
|
|
623
|
+
path: string;
|
|
624
|
+
})[];
|
|
487
625
|
role: string;
|
|
488
626
|
attachments?: {
|
|
489
627
|
path: string;
|
|
@@ -497,7 +635,13 @@ export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
|
497
635
|
toolName?: string | undefined;
|
|
498
636
|
}, {
|
|
499
637
|
role: string;
|
|
500
|
-
content?: string |
|
|
638
|
+
content?: string | ({
|
|
639
|
+
type: "text";
|
|
640
|
+
text: string;
|
|
641
|
+
} | {
|
|
642
|
+
type: "media";
|
|
643
|
+
path: string;
|
|
644
|
+
})[] | null | undefined;
|
|
501
645
|
attachments?: {
|
|
502
646
|
path: string;
|
|
503
647
|
}[] | undefined;
|
|
@@ -510,6 +654,8 @@ export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
|
510
654
|
toolName?: string | undefined;
|
|
511
655
|
}>>>;
|
|
512
656
|
modelId: z.ZodString;
|
|
657
|
+
prefill: z.ZodOptional<z.ZodBoolean>;
|
|
658
|
+
seedFrom: z.ZodOptional<z.ZodString>;
|
|
513
659
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
514
660
|
type: z.ZodLiteral<"function">;
|
|
515
661
|
name: z.ZodString;
|
|
@@ -542,6 +688,10 @@ export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
|
542
688
|
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
543
689
|
}, z.core.$loose>;
|
|
544
690
|
}, z.core.$strip>>>;
|
|
691
|
+
toolSearch: z.ZodOptional<z.ZodObject<{
|
|
692
|
+
defaultLimit: z.ZodOptional<z.ZodNumber>;
|
|
693
|
+
maxLimit: z.ZodOptional<z.ZodNumber>;
|
|
694
|
+
}, z.core.$strict>>;
|
|
545
695
|
stream: z.ZodBoolean;
|
|
546
696
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
547
697
|
generationParams: z.ZodOptional<z.ZodObject<{
|
|
@@ -581,9 +731,10 @@ export declare const completionOrchestrateRequestSchema: z.ZodObject<{
|
|
|
581
731
|
strict: z.ZodOptional<z.ZodBoolean>;
|
|
582
732
|
}, z.core.$strict>;
|
|
583
733
|
}, z.core.$strict>], "type">>;
|
|
584
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
585
734
|
type: z.ZodLiteral<"completionOrchestrate">;
|
|
586
735
|
maxToolTurns: z.ZodOptional<z.ZodNumber>;
|
|
736
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
737
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
587
738
|
}, z.core.$strip>;
|
|
588
739
|
/**
|
|
589
740
|
* Downstream frame of the orchestrated completion duplex stream. Exactly one
|
|
@@ -647,9 +798,12 @@ export declare const completionOrchestrateResponseSchema: z.ZodObject<{
|
|
|
647
798
|
emittedTokens: z.ZodOptional<z.ZodNumber>;
|
|
648
799
|
avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
|
|
649
800
|
toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
|
|
801
|
+
draftTokens: z.ZodOptional<z.ZodNumber>;
|
|
802
|
+
draftAcceptedTokens: z.ZodOptional<z.ZodNumber>;
|
|
650
803
|
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
651
804
|
cpu: "cpu";
|
|
652
805
|
gpu: "gpu";
|
|
806
|
+
npu: "npu";
|
|
653
807
|
}>>;
|
|
654
808
|
}, z.core.$strip>;
|
|
655
809
|
}, z.core.$strip>, z.ZodObject<{
|