@qvac/sdk 0.8.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -1
- package/README.md +191 -373
- package/dist/client/api/cancel.d.ts +4 -13
- package/dist/client/api/cancel.js +6 -16
- package/dist/client/api/completion-stream.d.ts +30 -24
- package/dist/client/api/completion-stream.js +70 -121
- package/dist/client/api/delete-cache.js +2 -3
- package/dist/client/api/download-asset.d.ts +5 -6
- package/dist/client/api/download-asset.js +20 -16
- package/dist/client/api/embed.d.ts +4 -21
- package/dist/client/api/embed.js +14 -4
- package/dist/client/api/index.d.ts +1 -5
- package/dist/client/api/index.js +1 -5
- package/dist/client/api/load-model.d.ts +21 -49
- package/dist/client/api/load-model.js +134 -40
- package/dist/client/api/logging-stream.d.ts +4 -7
- package/dist/client/api/logging-stream.js +5 -9
- package/dist/client/api/ping.d.ts +1 -1
- package/dist/client/api/ping.js +2 -3
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +3 -4
- package/dist/client/api/rag.d.ts +21 -216
- package/dist/client/api/rag.js +36 -396
- package/dist/client/api/stop-provider.d.ts +1 -1
- package/dist/client/api/stop-provider.js +3 -4
- package/dist/client/api/text-to-speech.d.ts +2 -2
- package/dist/client/api/text-to-speech.js +3 -3
- package/dist/client/api/transcribe.d.ts +5 -9
- package/dist/client/api/transcribe.js +9 -11
- package/dist/client/api/translate.d.ts +3 -3
- package/dist/client/api/translate.js +15 -15
- package/dist/client/api/unload-model.d.ts +1 -5
- package/dist/client/api/unload-model.js +4 -17
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/logging-stream-registry.js +13 -14
- package/dist/client/rpc/bare-client.d.ts +139 -3
- package/dist/client/rpc/bare-client.js +16 -117
- package/dist/client/rpc/bare-rpc-client.d.ts +4 -0
- package/dist/client/rpc/bare-rpc-client.js +87 -0
- package/dist/client/rpc/expo-rpc-client.d.ts +1 -2
- package/dist/client/rpc/expo-rpc-client.js +14 -57
- package/dist/client/rpc/node-rpc-client.d.ts +8 -3
- package/dist/client/rpc/node-rpc-client.js +62 -218
- package/dist/client/rpc/rpc-client.d.ts +2 -3
- package/dist/client/rpc/rpc-client.js +49 -184
- package/dist/constants/audio.d.ts +2 -1
- package/dist/constants/audio.js +17 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -1
- package/dist/examples/delegated-inference/consumer.js +2 -3
- package/dist/examples/download-with-cancel.js +4 -3
- package/dist/examples/embed-hyperdrive.js +4 -39
- package/dist/examples/kv-cache-cleanup.js +2 -1
- package/dist/examples/kv-cache-custom-key.js +2 -16
- package/dist/examples/kv-cache-example.js +2 -1
- package/dist/examples/llamacpp-file-logging.d.ts +2 -0
- package/dist/examples/{logging-file-transport.js → llamacpp-file-logging.js} +8 -3
- package/dist/examples/llamacpp-filesystem.js +2 -2
- package/dist/examples/llamacpp-http.js +1 -0
- package/dist/examples/llamacpp-hyperdrive.js +2 -1
- package/dist/examples/llamacpp-multimodal.js +4 -3
- package/dist/examples/llamacpp-native-tools.js +30 -72
- package/dist/examples/multi-model-demo.js +3 -2
- package/dist/examples/parallel-download.js +14 -46
- package/dist/examples/rag/rag-chromadb.js +1 -0
- package/dist/examples/rag/rag-hyperdb-workspaces.d.ts +2 -0
- package/dist/examples/rag/rag-hyperdb-workspaces.js +107 -0
- package/dist/examples/rag/rag-hyperdb.d.ts +2 -0
- package/dist/examples/rag/{rag-hyperdb/ingest.js → rag-hyperdb.js} +5 -10
- package/dist/examples/rag/rag-lancedb.js +1 -0
- package/dist/examples/rag/rag-sqlite.js +1 -0
- package/dist/examples/text-to-speech.d.ts +3 -0
- package/dist/examples/{tts/utils.js → text-to-speech.js} +63 -18
- package/dist/examples/translation/translation-indic.js +1 -4
- package/dist/examples/translation/translation-llm-context.js +1 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/translation/translation-opus.js +3 -6
- package/dist/examples/translation/translation-stream.js +3 -3
- package/dist/examples/whispercpp-filesystem.js +43 -0
- package/dist/examples/{transcription/whispercpp-microphone-record.js → whispercpp-microphone-record.js} +9 -8
- package/dist/expo/plugins/index.d.ts +0 -3
- package/dist/expo/plugins/index.js +0 -3
- package/dist/expo/plugins/withMobileBundle.d.ts +2 -5
- package/dist/expo/plugins/withMobileBundle.js +40 -121
- package/dist/expo/plugins/withQvacSDK.d.ts +0 -4
- package/dist/expo/plugins/withQvacSDK.js +1 -26
- package/dist/index.d.ts +4 -9
- package/dist/index.js +5 -11
- package/dist/logging/base-logger.js +16 -26
- package/dist/logging/index.d.ts +1 -7
- package/dist/logging/index.js +1 -7
- package/dist/logging/logger.d.ts +2 -0
- package/dist/logging/logger.js +6 -11
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/stream-logger.js +3 -6
- package/dist/logging/transport.js +2 -2
- package/dist/logging/types.d.ts +0 -2
- package/dist/logging/utils.d.ts +0 -2
- package/dist/logging/utils.js +0 -62
- package/dist/models/{registry → hyperdrive}/index.js +1 -1
- package/dist/models/hyperdrive/models.d.ts +619 -0
- package/dist/models/hyperdrive/models.js +693 -0
- package/dist/schemas/cancel.d.ts +0 -6
- package/dist/schemas/cancel.js +0 -5
- package/dist/schemas/common.d.ts +164 -2973
- package/dist/schemas/common.js +1 -23
- package/dist/schemas/completion-stream.d.ts +60 -31
- package/dist/schemas/completion-stream.js +44 -20
- package/dist/schemas/delegate.d.ts +0 -1
- package/dist/schemas/delegate.js +0 -1
- package/dist/schemas/download-asset.d.ts +3 -125
- package/dist/schemas/download-asset.js +5 -22
- package/dist/schemas/embed.d.ts +3 -3
- package/dist/schemas/embed.js +2 -9
- package/dist/schemas/index.d.ts +1 -19
- package/dist/schemas/index.js +1 -19
- package/dist/schemas/llamacpp-config.d.ts +12 -243
- package/dist/schemas/llamacpp-config.js +14 -50
- package/dist/schemas/load-model.d.ts +893 -14358
- package/dist/schemas/load-model.js +72 -325
- package/dist/schemas/logging-stream.d.ts +4 -11
- package/dist/schemas/logging-stream.js +3 -4
- package/dist/schemas/rag.d.ts +52 -183
- package/dist/schemas/rag.js +23 -152
- package/dist/schemas/text-to-speech.d.ts +1 -692
- package/dist/schemas/text-to-speech.js +3 -35
- package/dist/schemas/transcription.d.ts +0 -3
- package/dist/schemas/transcription.js +0 -1
- package/dist/schemas/translate.d.ts +23 -68
- package/dist/schemas/translate.js +11 -37
- package/dist/schemas/translation-config.d.ts +7 -810
- package/dist/schemas/translation-config.js +7 -113
- package/dist/schemas/unload-model.d.ts +0 -2
- package/dist/schemas/unload-model.js +0 -2
- package/dist/schemas/whispercpp-config.d.ts +25 -0
- package/dist/schemas/whispercpp-config.js +18 -0
- package/dist/server/bare/{ops → addons}/cancel.js +1 -2
- package/dist/server/bare/addons/index.d.ts +4 -0
- package/dist/server/bare/addons/index.js +3 -0
- package/dist/server/bare/addons/llamacpp/create-model.d.ts +5 -0
- package/dist/server/bare/addons/llamacpp/create-model.js +67 -0
- package/dist/server/bare/{plugins/llamacpp-completion/ops → addons/llamacpp/handlers}/completion-stream.d.ts +1 -2
- package/dist/server/bare/{plugins/llamacpp-completion/ops → addons/llamacpp/handlers}/completion-stream.js +87 -54
- package/dist/server/bare/addons/llamacpp/handlers/embed.d.ts +4 -0
- package/dist/server/bare/{ops → addons/llamacpp/handlers}/embed.js +7 -22
- package/dist/server/bare/addons/llamacpp/index.d.ts +4 -0
- package/dist/server/bare/addons/llamacpp/index.js +3 -0
- package/dist/server/bare/{ops → addons/llamacpp}/kv-cache-utils.d.ts +1 -4
- package/dist/server/bare/{ops → addons/llamacpp}/kv-cache-utils.js +19 -54
- package/dist/server/bare/addons/load-model.d.ts +3 -0
- package/dist/server/bare/addons/load-model.js +62 -0
- package/dist/server/bare/addons/translation/create-model.d.ts +4 -0
- package/dist/server/bare/addons/translation/create-model.js +45 -0
- package/dist/server/bare/addons/translation/handlers/translate.d.ts +3 -0
- package/dist/server/bare/{ops → addons/translation/handlers}/translate.js +14 -47
- package/dist/server/bare/addons/translation/index.d.ts +3 -0
- package/dist/server/bare/addons/translation/index.js +2 -0
- package/dist/server/bare/addons/tts/create-model.d.ts +6 -0
- package/dist/server/bare/addons/tts/create-model.js +40 -0
- package/dist/server/bare/{plugins/onnx-tts/ops → addons/tts/handlers}/text-to-speech.js +3 -25
- package/dist/server/bare/addons/tts/index.d.ts +3 -0
- package/dist/server/bare/addons/tts/index.js +2 -0
- package/dist/server/bare/addons/unload-model.js +20 -0
- package/dist/server/bare/addons/whispercpp/create-model.d.ts +6 -0
- package/dist/server/bare/addons/whispercpp/create-model.js +55 -0
- package/dist/server/bare/addons/whispercpp/handlers/transcribe-stream.d.ts +3 -0
- package/dist/server/bare/addons/whispercpp/handlers/transcribe-stream.js +48 -0
- package/dist/server/bare/addons/whispercpp/index.d.ts +3 -0
- package/dist/server/bare/addons/whispercpp/index.js +2 -0
- package/dist/server/bare/delegate-rpc-client.d.ts +0 -6
- package/dist/server/bare/delegate-rpc-client.js +46 -157
- package/dist/server/bare/hyperswarm.d.ts +0 -3
- package/dist/server/bare/hyperswarm.js +6 -29
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +10 -9
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +4 -7
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +14 -13
- package/dist/server/bare/rag-hyperdb/handlers/search.js +10 -10
- package/dist/server/bare/rag-hyperdb/index.d.ts +1 -8
- package/dist/server/bare/rag-hyperdb/index.js +1 -8
- package/dist/server/bare/rag-hyperdb/rag-manager.d.ts +5 -0
- package/dist/server/bare/rag-hyperdb/rag-manager.js +65 -0
- package/dist/server/bare/registry/logging-stream-registry.d.ts +7 -24
- package/dist/server/bare/registry/logging-stream-registry.js +20 -99
- package/dist/server/bare/registry/model-registry.d.ts +26 -14
- package/dist/server/bare/registry/model-registry.js +12 -32
- package/dist/server/error-handlers.d.ts +2 -3
- package/dist/server/error-handlers.js +10 -15
- package/dist/server/http-server.d.ts +2 -0
- package/dist/server/http-server.js +189 -0
- package/dist/server/rpc/create-server.js +3 -5
- package/dist/server/rpc/handle-request.d.ts +9 -0
- package/dist/server/rpc/handle-request.js +242 -92
- package/dist/server/rpc/handlers/cancelHandler.js +3 -14
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +1 -3
- package/dist/server/rpc/handlers/completion-stream-delegated.js +6 -18
- package/dist/server/rpc/handlers/completion-stream.js +41 -2
- package/dist/server/rpc/handlers/delete-cache.js +2 -4
- package/dist/server/rpc/handlers/download-asset.js +6 -59
- package/dist/server/rpc/handlers/embed.js +19 -2
- package/dist/server/rpc/handlers/index.d.ts +0 -13
- package/dist/server/rpc/handlers/index.js +0 -13
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +11 -12
- package/dist/server/rpc/handlers/load-model/download-manager.js +28 -43
- package/dist/server/rpc/handlers/load-model/http.d.ts +1 -2
- package/dist/server/rpc/handlers/load-model/http.js +55 -424
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +1 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +171 -364
- package/dist/server/rpc/handlers/load-model/index.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/index.js +2 -2
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +1 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +29 -110
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -6
- package/dist/server/rpc/handlers/load-model-delegated.js +21 -59
- package/dist/server/rpc/handlers/{load-model/handler.d.ts → load-model.d.ts} +2 -2
- package/dist/server/rpc/handlers/load-model.js +57 -0
- package/dist/server/rpc/handlers/logging-stream.js +4 -4
- package/dist/server/rpc/handlers/provideHandler/connection.js +10 -12
- package/dist/server/rpc/handlers/provideHandler/handler.js +17 -20
- package/dist/server/rpc/handlers/provideHandler/proxy.js +6 -8
- package/dist/server/rpc/handlers/rag.d.ts +2 -2
- package/dist/server/rpc/handlers/rag.js +43 -130
- package/dist/server/rpc/handlers/stopProvideHandler.js +2 -6
- package/dist/server/rpc/handlers/text-to-speech.js +5 -2
- package/dist/server/rpc/handlers/transcribe-stream.js +24 -2
- package/dist/server/rpc/handlers/translate.js +49 -2
- package/dist/server/rpc/handlers/unload-model.js +3 -12
- package/dist/server/rpc/index.d.ts +1 -1
- package/dist/server/utils/audio/decoder.d.ts +1 -2
- package/dist/server/utils/audio/decoder.js +12 -49
- package/dist/server/utils/cache.d.ts +8 -19
- package/dist/server/utils/cache.js +15 -100
- package/dist/server/utils/hash.d.ts +5 -0
- package/dist/server/utils/hash.js +11 -0
- package/dist/server/utils/index.d.ts +2 -7
- package/dist/server/utils/index.js +2 -7
- package/dist/server/utils/tool-parser.js +14 -28
- package/dist/server/worker.d.ts +5 -4
- package/dist/server/worker.js +89 -22
- package/package.json +41 -141
- package/NOTICE +0 -358
- package/bare-imports.json +0 -44
- package/dist/client/api/get-model-info.d.ts +0 -36
- package/dist/client/api/get-model-info.js +0 -14
- package/dist/client/api/invoke-plugin.d.ts +0 -15
- package/dist/client/api/invoke-plugin.js +0 -38
- package/dist/client/api/ocr.d.ts +0 -31
- package/dist/client/api/ocr.js +0 -88
- package/dist/client/api/registry.d.ts +0 -14
- package/dist/client/api/registry.js +0 -37
- package/dist/client/config-loader/config-utils.d.ts +0 -5
- package/dist/client/config-loader/config-utils.js +0 -20
- package/dist/client/config-loader/resolve-config.bare.d.ts +0 -9
- package/dist/client/config-loader/resolve-config.bare.js +0 -87
- package/dist/client/config-loader/resolve-config.expo.d.ts +0 -11
- package/dist/client/config-loader/resolve-config.expo.js +0 -62
- package/dist/client/config-loader/resolve-config.node.d.ts +0 -10
- package/dist/client/config-loader/resolve-config.node.js +0 -145
- package/dist/client/init-hooks.d.ts +0 -21
- package/dist/client/init-hooks.js +0 -66
- package/dist/client/rpc/expo-device-info.d.ts +0 -6
- package/dist/client/rpc/expo-device-info.js +0 -32
- package/dist/client/rpc/profiling/index.d.ts +0 -2
- package/dist/client/rpc/profiling/index.js +0 -1
- package/dist/client/rpc/profiling/profiler.d.ts +0 -27
- package/dist/client/rpc/profiling/profiler.js +0 -139
- package/dist/constants/registry.d.ts +0 -2
- package/dist/constants/registry.js +0 -1
- package/dist/examples/cache-management.d.ts +0 -2
- package/dist/examples/cache-management.js +0 -97
- package/dist/examples/config/blind-relay/blind-relay.config.d.ts +0 -5
- package/dist/examples/config/blind-relay/blind-relay.config.js +0 -7
- package/dist/examples/config/default/default.config.d.ts +0 -8
- package/dist/examples/config/default/default.config.js +0 -6
- package/dist/examples/config/plugins/plugins.config.d.ts +0 -5
- package/dist/examples/config/plugins/plugins.config.js +0 -4
- package/dist/examples/config-reload.d.ts +0 -2
- package/dist/examples/config-reload.js +0 -49
- package/dist/examples/default-config-usage.d.ts +0 -17
- package/dist/examples/default-config-usage.js +0 -47
- package/dist/examples/delegated-inference/consumer-profiled.d.ts +0 -2
- package/dist/examples/delegated-inference/consumer-profiled.js +0 -67
- package/dist/examples/download-with-blind-relays.d.ts +0 -2
- package/dist/examples/download-with-blind-relays.js +0 -49
- package/dist/examples/llamacpp-sharded.d.ts +0 -2
- package/dist/examples/llamacpp-sharded.js +0 -53
- package/dist/examples/logging-file-transport.d.ts +0 -2
- package/dist/examples/logging-streaming.d.ts +0 -2
- package/dist/examples/logging-streaming.js +0 -75
- package/dist/examples/mcp-websearch.d.ts +0 -13
- package/dist/examples/mcp-websearch.js +0 -176
- package/dist/examples/ocr-fasttext.d.ts +0 -2
- package/dist/examples/ocr-fasttext.js +0 -52
- package/dist/examples/plugins.d.ts +0 -14
- package/dist/examples/plugins.js +0 -129
- package/dist/examples/profiling/basic.d.ts +0 -2
- package/dist/examples/profiling/basic.js +0 -71
- package/dist/examples/profiling/per-call.d.ts +0 -2
- package/dist/examples/profiling/per-call.js +0 -30
- package/dist/examples/quickstart.d.ts +0 -2
- package/dist/examples/quickstart.js +0 -28
- package/dist/examples/rag/rag-hyperdb/cancellation.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/cancellation.js +0 -75
- package/dist/examples/rag/rag-hyperdb/ingest.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +0 -74
- package/dist/examples/rag/rag-hyperdb/workspaces.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/workspaces.js +0 -178
- package/dist/examples/registry-query.d.ts +0 -2
- package/dist/examples/registry-query.js +0 -87
- package/dist/examples/transcription/parakeet-ctc-filesystem.d.ts +0 -2
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +0 -40
- package/dist/examples/transcription/parakeet-microphone-record.d.ts +0 -2
- package/dist/examples/transcription/parakeet-microphone-record.js +0 -95
- package/dist/examples/transcription/parakeet-sortformer.d.ts +0 -2
- package/dist/examples/transcription/parakeet-sortformer.js +0 -115
- package/dist/examples/transcription/parakeet-tdt-filesystem.d.ts +0 -2
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +0 -44
- package/dist/examples/transcription/whispercpp-filesystem.js +0 -69
- package/dist/examples/transcription/whispercpp-prompt.d.ts +0 -2
- package/dist/examples/transcription/whispercpp-prompt.js +0 -67
- package/dist/examples/translation/translation-bergamot-batch.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot-batch.js +0 -49
- package/dist/examples/translation/translation-bergamot-pivot.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot-pivot.js +0 -73
- package/dist/examples/translation/translation-bergamot.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot.js +0 -39
- package/dist/examples/translation/translation-llm-afriquegemma.d.ts +0 -2
- package/dist/examples/translation/translation-llm-afriquegemma.js +0 -39
- package/dist/examples/tts/chatterbox.d.ts +0 -2
- package/dist/examples/tts/chatterbox.js +0 -59
- package/dist/examples/tts/supertonic.d.ts +0 -2
- package/dist/examples/tts/supertonic.js +0 -51
- package/dist/examples/tts/utils.d.ts +0 -17
- package/dist/expo/plugins/resolve-sdk-package-dir.d.ts +0 -15
- package/dist/expo/plugins/resolve-sdk-package-dir.js +0 -31
- package/dist/expo/plugins/withAndroidArchitecture.d.ts +0 -8
- package/dist/expo/plugins/withAndroidArchitecture.js +0 -52
- package/dist/expo/plugins/withAndroidNdkVersion.d.ts +0 -8
- package/dist/expo/plugins/withAndroidNdkVersion.js +0 -31
- package/dist/expo/plugins/withDeviceInfo.d.ts +0 -10
- package/dist/expo/plugins/withDeviceInfo.js +0 -48
- package/dist/logging/addon.d.ts +0 -6
- package/dist/logging/addon.js +0 -75
- package/dist/logging/client-logger.d.ts +0 -3
- package/dist/logging/client-logger.js +0 -24
- package/dist/logging/namespaces.d.ts +0 -6
- package/dist/logging/namespaces.js +0 -6
- package/dist/logging/registry.d.ts +0 -31
- package/dist/logging/registry.js +0 -62
- package/dist/logging/server-logger.d.ts +0 -3
- package/dist/logging/server-logger.js +0 -16
- package/dist/models/registry/models.d.ts +0 -10417
- package/dist/models/registry/models.js +0 -10757
- package/dist/models/update-models/codegen.d.ts +0 -3
- package/dist/models/update-models/codegen.js +0 -135
- package/dist/models/update-models/history.d.ts +0 -24
- package/dist/models/update-models/history.js +0 -107
- package/dist/models/update-models/index.d.ts +0 -2
- package/dist/models/update-models/index.js +0 -125
- package/dist/models/update-models/naming.d.ts +0 -4
- package/dist/models/update-models/naming.js +0 -370
- package/dist/models/update-models/processing.d.ts +0 -8
- package/dist/models/update-models/processing.js +0 -67
- package/dist/models/update-models/registry.d.ts +0 -4
- package/dist/models/update-models/registry.js +0 -67
- package/dist/models/update-models/shards.d.ts +0 -4
- package/dist/models/update-models/shards.js +0 -57
- package/dist/models/update-models/types.d.ts +0 -60
- package/dist/models/update-models/types.js +0 -1
- package/dist/models/update-models/utils.d.ts +0 -3
- package/dist/models/update-models/utils.js +0 -21
- package/dist/pear/pre.d.ts +0 -18
- package/dist/pear/pre.js +0 -433
- package/dist/profiling/aggregator.d.ts +0 -15
- package/dist/profiling/aggregator.js +0 -100
- package/dist/profiling/clock.d.ts +0 -12
- package/dist/profiling/clock.js +0 -51
- package/dist/profiling/controller.d.ts +0 -33
- package/dist/profiling/controller.js +0 -123
- package/dist/profiling/envelope.d.ts +0 -10
- package/dist/profiling/envelope.js +0 -36
- package/dist/profiling/events.d.ts +0 -20
- package/dist/profiling/events.js +0 -37
- package/dist/profiling/exporters.d.ts +0 -10
- package/dist/profiling/exporters.js +0 -236
- package/dist/profiling/index.d.ts +0 -36
- package/dist/profiling/index.js +0 -31
- package/dist/profiling/ring-buffer.d.ts +0 -19
- package/dist/profiling/ring-buffer.js +0 -83
- package/dist/profiling/types.d.ts +0 -47
- package/dist/profiling/types.js +0 -1
- package/dist/schemas/archive.d.ts +0 -9
- package/dist/schemas/archive.js +0 -17
- package/dist/schemas/engine-addon-map.d.ts +0 -5
- package/dist/schemas/engine-addon-map.js +0 -52
- package/dist/schemas/get-model-info.d.ts +0 -120
- package/dist/schemas/get-model-info.js +0 -58
- package/dist/schemas/json-schema.d.ts +0 -16
- package/dist/schemas/json-schema.js +0 -2
- package/dist/schemas/mcp-adapter.d.ts +0 -47
- package/dist/schemas/mcp-adapter.js +0 -1
- package/dist/schemas/model-src-utils.d.ts +0 -148
- package/dist/schemas/model-src-utils.js +0 -35
- package/dist/schemas/model-types.d.ts +0 -183
- package/dist/schemas/model-types.js +0 -168
- package/dist/schemas/ocr.d.ts +0 -125
- package/dist/schemas/ocr.js +0 -57
- package/dist/schemas/path-validation.d.ts +0 -10
- package/dist/schemas/path-validation.js +0 -22
- package/dist/schemas/plugin.d.ts +0 -226
- package/dist/schemas/plugin.js +0 -158
- package/dist/schemas/profiling.d.ts +0 -105
- package/dist/schemas/profiling.js +0 -66
- package/dist/schemas/registry.d.ts +0 -356
- package/dist/schemas/registry.js +0 -93
- package/dist/schemas/reload-config.d.ts +0 -476
- package/dist/schemas/reload-config.js +0 -44
- package/dist/schemas/runtime-context.d.ts +0 -19
- package/dist/schemas/runtime-context.js +0 -7
- package/dist/schemas/sdk-config.d.ts +0 -2973
- package/dist/schemas/sdk-config.js +0 -136
- package/dist/schemas/sdk-errors-client.d.ts +0 -31
- package/dist/schemas/sdk-errors-client.js +0 -143
- package/dist/schemas/sdk-errors-registry.d.ts +0 -6
- package/dist/schemas/sdk-errors-registry.js +0 -8
- package/dist/schemas/sdk-errors-server.d.ts +0 -89
- package/dist/schemas/sdk-errors-server.js +0 -451
- package/dist/schemas/shard.d.ts +0 -21
- package/dist/schemas/shard.js +0 -17
- package/dist/schemas/tools.d.ts +0 -65
- package/dist/schemas/tools.js +0 -43
- package/dist/schemas/transcription-config.d.ts +0 -383
- package/dist/schemas/transcription-config.js +0 -95
- package/dist/scripts/run-security-tests-bare.d.ts +0 -2
- package/dist/scripts/run-security-tests-bare.js +0 -78
- package/dist/scripts/run-security-tests.d.ts +0 -2
- package/dist/scripts/run-security-tests.js +0 -22
- package/dist/scripts/run-unit-tests.d.ts +0 -2
- package/dist/scripts/run-unit-tests.js +0 -17
- package/dist/server/bare/ops/embed.d.ts +0 -12
- package/dist/server/bare/ops/load-model.d.ts +0 -9
- package/dist/server/bare/ops/load-model.js +0 -85
- package/dist/server/bare/ops/transcribe.d.ts +0 -3
- package/dist/server/bare/ops/transcribe.js +0 -75
- package/dist/server/bare/ops/translate.d.ts +0 -5
- package/dist/server/bare/ops/unload-model.js +0 -41
- package/dist/server/bare/plugins/index.d.ts +0 -8
- package/dist/server/bare/plugins/index.js +0 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +0 -6
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +0 -34
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +0 -220
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +0 -155
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +0 -54
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +0 -87
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +0 -367
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +0 -204
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +0 -10
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +0 -110
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +0 -86
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +0 -117
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +0 -373
- package/dist/server/bare/plugins/onnx-tts/plugin.js +0 -182
- 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/parakeet-transcription/plugin.d.ts +0 -317
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +0 -154
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +0 -237
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +0 -86
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +0 -7
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +0 -14
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +0 -18
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +0 -4
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +0 -16
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.d.ts +0 -7
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +0 -39
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +0 -15
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +0 -136
- package/dist/server/bare/registry/config-registry.d.ts +0 -14
- package/dist/server/bare/registry/config-registry.js +0 -82
- package/dist/server/bare/registry/model-config-registry.d.ts +0 -4
- package/dist/server/bare/registry/model-config-registry.js +0 -15
- package/dist/server/bare/registry/model-config-utils.d.ts +0 -15
- package/dist/server/bare/registry/model-config-utils.js +0 -112
- package/dist/server/bare/registry/registry-client.d.ts +0 -5
- package/dist/server/bare/registry/registry-client.js +0 -37
- package/dist/server/bare/registry/runtime-context-registry.d.ts +0 -7
- package/dist/server/bare/registry/runtime-context-registry.js +0 -26
- package/dist/server/bare/utils/audio-input.d.ts +0 -10
- package/dist/server/bare/utils/audio-input.js +0 -33
- package/dist/server/bare/utils/loader-adapter.d.ts +0 -7
- package/dist/server/bare/utils/loader-adapter.js +0 -9
- package/dist/server/env.d.ts +0 -22
- package/dist/server/env.js +0 -57
- package/dist/server/plugins/index.d.ts +0 -2
- package/dist/server/plugins/index.js +0 -1
- package/dist/server/plugins/registry.d.ts +0 -9
- package/dist/server/plugins/registry.js +0 -79
- package/dist/server/rpc/delegate-transport.d.ts +0 -19
- package/dist/server/rpc/delegate-transport.js +0 -215
- package/dist/server/rpc/handler-registry.d.ts +0 -3
- package/dist/server/rpc/handler-registry.js +0 -90
- package/dist/server/rpc/handler-utils.d.ts +0 -23
- package/dist/server/rpc/handler-utils.js +0 -128
- package/dist/server/rpc/handlers/get-model-info.d.ts +0 -3
- package/dist/server/rpc/handlers/get-model-info.js +0 -164
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +0 -6
- package/dist/server/rpc/handlers/load-model/download-stats.js +0 -87
- package/dist/server/rpc/handlers/load-model/handler.js +0 -187
- package/dist/server/rpc/handlers/load-model/registry.d.ts +0 -11
- package/dist/server/rpc/handlers/load-model/registry.js +0 -564
- package/dist/server/rpc/handlers/load-model/types.d.ts +0 -29
- package/dist/server/rpc/handlers/load-model/types.js +0 -1
- package/dist/server/rpc/handlers/ocr-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/ocr-stream.js +0 -4
- package/dist/server/rpc/handlers/ping.d.ts +0 -3
- package/dist/server/rpc/handlers/ping.js +0 -3
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +0 -15
- package/dist/server/rpc/handlers/plugin-dispatch.js +0 -59
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +0 -4
- package/dist/server/rpc/handlers/plugin-invoke.js +0 -92
- package/dist/server/rpc/handlers/registry.d.ts +0 -5
- package/dist/server/rpc/handlers/registry.js +0 -157
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +0 -3
- package/dist/server/rpc/handlers/unload-model-delegated.js +0 -32
- package/dist/server/rpc/profiling/context.d.ts +0 -18
- package/dist/server/rpc/profiling/context.js +0 -38
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +0 -32
- package/dist/server/rpc/profiling/delegation-profiler.js +0 -154
- package/dist/server/rpc/profiling/index.d.ts +0 -5
- package/dist/server/rpc/profiling/index.js +0 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +0 -25
- package/dist/server/rpc/profiling/operation-metrics.js +0 -199
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +0 -18
- package/dist/server/rpc/profiling/operation-wrappers.js +0 -124
- package/dist/server/rpc/profiling/profiler.d.ts +0 -13
- package/dist/server/rpc/profiling/profiler.js +0 -97
- package/dist/server/utils/archive.d.ts +0 -4
- package/dist/server/utils/archive.js +0 -179
- package/dist/server/utils/checksum.d.ts +0 -4
- package/dist/server/utils/checksum.js +0 -31
- package/dist/server/utils/config-transform.d.ts +0 -3
- package/dist/server/utils/config-transform.js +0 -23
- package/dist/server/utils/formatting.d.ts +0 -19
- package/dist/server/utils/formatting.js +0 -61
- package/dist/server/utils/gguf-tensor-extractor.d.ts +0 -15
- package/dist/server/utils/gguf-tensor-extractor.js +0 -314
- package/dist/server/utils/path-security.d.ts +0 -12
- package/dist/server/utils/path-security.js +0 -25
- package/dist/server/utils/shard-utils.d.ts +0 -48
- package/dist/server/utils/shard-utils.js +0 -125
- package/dist/server/utils/tool-integration.d.ts +0 -13
- package/dist/server/utils/tool-integration.js +0 -43
- package/dist/server/worker-core.d.ts +0 -6
- package/dist/server/worker-core.js +0 -88
- package/dist/utils/errors-base.d.ts +0 -3
- package/dist/utils/errors-base.js +0 -13
- package/dist/utils/errors-client.d.ts +0 -137
- package/dist/utils/errors-client.js +0 -240
- package/dist/utils/errors-server.d.ts +0 -236
- package/dist/utils/errors-server.js +0 -412
- package/dist/utils/global-singleton.d.ts +0 -2
- package/dist/utils/global-singleton.js +0 -10
- package/dist/utils/mcp-adapter.d.ts +0 -12
- package/dist/utils/mcp-adapter.js +0 -103
- package/dist/utils/object.d.ts +0 -2
- package/dist/utils/object.js +0 -3
- package/dist/utils/path-sanitize.d.ts +0 -17
- package/dist/utils/path-sanitize.js +0 -54
- package/dist/utils/tool-helpers.d.ts +0 -25
- package/dist/utils/tool-helpers.js +0 -112
- package/expo/plugins/patches/android-link.mjs +0 -63
- package/expo/plugins/patches/ios-link.mjs +0 -63
- /package/dist/examples/{transcription/whispercpp-filesystem.d.ts → whispercpp-filesystem.d.ts} +0 -0
- /package/dist/examples/{transcription/whispercpp-microphone-record.d.ts → whispercpp-microphone-record.d.ts} +0 -0
- /package/dist/models/{registry → hyperdrive}/index.d.ts +0 -0
- /package/dist/server/bare/{ops → addons}/cancel.d.ts +0 -0
- /package/dist/server/bare/{plugins/onnx-tts/ops → addons/tts/handlers}/text-to-speech.d.ts +0 -0
- /package/dist/server/bare/{ops → addons}/unload-model.d.ts +0 -0
|
@@ -1,35 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const MARIAN_LANGUAGES = ["en", "de", "es", "it", "ru", "ja"];
|
|
5
|
-
// Bergamot supports many more language pairs
|
|
6
|
-
export const BERGAMOT_LANGUAGES = [
|
|
7
|
-
"en",
|
|
8
|
-
"ar",
|
|
9
|
-
"bg",
|
|
10
|
-
"ca",
|
|
11
|
-
"cs",
|
|
12
|
-
"de",
|
|
13
|
-
"es",
|
|
14
|
-
"et",
|
|
15
|
-
"fi",
|
|
16
|
-
"fr",
|
|
17
|
-
"hu",
|
|
18
|
-
"is",
|
|
19
|
-
"it",
|
|
20
|
-
"ja",
|
|
21
|
-
"ko",
|
|
22
|
-
"lt",
|
|
23
|
-
"lv",
|
|
24
|
-
"nl",
|
|
25
|
-
"pl",
|
|
26
|
-
"pt",
|
|
27
|
-
"ru",
|
|
28
|
-
"sk",
|
|
29
|
-
"sl",
|
|
30
|
-
"uk",
|
|
31
|
-
"zh",
|
|
32
|
-
];
|
|
2
|
+
// Marian model languages
|
|
3
|
+
const MARIAN_LANGUAGES = ["en", "de", "es", "it", "ru", "ja"];
|
|
33
4
|
// IndicTrans2 model languages
|
|
34
5
|
export const INDICTRANS_LANGUAGES = [
|
|
35
6
|
"asm_Beng", // Assamese
|
|
@@ -59,94 +30,17 @@ export const INDICTRANS_LANGUAGES = [
|
|
|
59
30
|
"tel_Telu", // Telugu
|
|
60
31
|
"urd_Arab", // Urdu
|
|
61
32
|
];
|
|
62
|
-
export const AFRICAN_LANGUAGES_MAP = new Map([
|
|
63
|
-
["afr_Latn", "Afrikaans"],
|
|
64
|
-
["swh_Latn", "Swahili"],
|
|
65
|
-
["ary_Arab", "Moroccan Arabic"],
|
|
66
|
-
["som_Latn", "Somali"],
|
|
67
|
-
["amh_Ethi", "Amharic"],
|
|
68
|
-
["arz_Arab", "Egyptian Arabic"],
|
|
69
|
-
["hau_Latn", "Hausa"],
|
|
70
|
-
["kin_Latn", "Kinyarwanda"],
|
|
71
|
-
["zul_Latn", "Zulu"],
|
|
72
|
-
["ibo_Latn", "Igbo"],
|
|
73
|
-
["plt_Latn", "Plateau Malagasy"],
|
|
74
|
-
["xho_Latn", "Xhosa"],
|
|
75
|
-
["sna_Latn", "Shona"],
|
|
76
|
-
["yor_Latn", "Yoruba"],
|
|
77
|
-
["nya_Latn", "Nyanja"],
|
|
78
|
-
["sot_Latn", "Southern Sotho"],
|
|
79
|
-
["tir_Ethi", "Tigrinya"],
|
|
80
|
-
["aeb_Arab", "Tunisian Arabic"],
|
|
81
|
-
["gaz_Latn", "Oromo"],
|
|
82
|
-
["tsn_Latn", "Tswana"],
|
|
83
|
-
]);
|
|
84
|
-
// Union of all NMT languages (for general type usage)
|
|
85
33
|
export const NMT_LANGUAGES = [
|
|
86
34
|
...MARIAN_LANGUAGES,
|
|
87
|
-
...BERGAMOT_LANGUAGES,
|
|
88
35
|
...INDICTRANS_LANGUAGES,
|
|
89
36
|
];
|
|
90
|
-
export const
|
|
91
|
-
|
|
92
|
-
const nmtGenerationParamsSchema = z.object({
|
|
37
|
+
export const nmtConfigSchema = z
|
|
38
|
+
.object({
|
|
93
39
|
mode: z.enum(["full"]).optional(),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
maxlength: z.number().optional(),
|
|
97
|
-
repetitionpenalty: z.number().optional(),
|
|
98
|
-
norepeatngramsize: z.number().optional(),
|
|
99
|
-
temperature: z.number().optional(),
|
|
100
|
-
topk: z.number().optional(),
|
|
101
|
-
topp: z.number().optional(),
|
|
102
|
-
});
|
|
103
|
-
// Opus engine config (Marian-based) - supports MARIAN_LANGUAGES
|
|
104
|
-
const opusConfigSchema = nmtGenerationParamsSchema.extend({
|
|
105
|
-
engine: z.literal("Opus"),
|
|
106
|
-
from: z.enum(MARIAN_LANGUAGES),
|
|
107
|
-
to: z.enum(MARIAN_LANGUAGES),
|
|
108
|
-
});
|
|
109
|
-
// Pivot model configuration for Bergamot (for translation via intermediate language)
|
|
110
|
-
const bergamotPivotModelSchema = nmtGenerationParamsSchema
|
|
111
|
-
.extend({
|
|
112
|
-
modelSrc: modelSrcInputSchema,
|
|
113
|
-
srcVocabSrc: modelSrcInputSchema.optional(),
|
|
114
|
-
dstVocabSrc: modelSrcInputSchema.optional(),
|
|
115
|
-
normalize: z.number().optional(),
|
|
40
|
+
from: z.enum(NMT_LANGUAGES),
|
|
41
|
+
to: z.enum(NMT_LANGUAGES),
|
|
116
42
|
})
|
|
117
|
-
.
|
|
118
|
-
// Bergamot engine config - supports BERGAMOT_LANGUAGES
|
|
119
|
-
const bergamotConfigSchema = nmtGenerationParamsSchema.extend({
|
|
120
|
-
engine: z.literal("Bergamot"),
|
|
121
|
-
from: z.enum(BERGAMOT_LANGUAGES),
|
|
122
|
-
to: z.enum(BERGAMOT_LANGUAGES),
|
|
123
|
-
srcVocabSrc: modelSrcInputSchema.optional(),
|
|
124
|
-
dstVocabSrc: modelSrcInputSchema.optional(),
|
|
125
|
-
normalize: z.number().optional(),
|
|
126
|
-
pivotModel: bergamotPivotModelSchema,
|
|
127
|
-
});
|
|
128
|
-
// IndicTrans engine config - supports INDICTRANS_LANGUAGES
|
|
129
|
-
const indicTransConfigSchema = nmtGenerationParamsSchema.extend({
|
|
130
|
-
engine: z.literal("IndicTrans"),
|
|
131
|
-
from: z.enum(INDICTRANS_LANGUAGES),
|
|
132
|
-
to: z.enum(INDICTRANS_LANGUAGES),
|
|
133
|
-
});
|
|
134
|
-
// Discriminated union of all engine configs
|
|
135
|
-
export const nmtConfigBaseSchema = z.discriminatedUnion("engine", [
|
|
136
|
-
opusConfigSchema,
|
|
137
|
-
bergamotConfigSchema,
|
|
138
|
-
indicTransConfigSchema,
|
|
139
|
-
]);
|
|
140
|
-
// Apply defaults via transform
|
|
141
|
-
export const nmtConfigSchema = nmtConfigBaseSchema.transform((data) => ({
|
|
43
|
+
.transform((data) => ({
|
|
142
44
|
...data,
|
|
143
45
|
mode: data.mode ?? "full",
|
|
144
|
-
beamsize: data.beamsize ?? 4,
|
|
145
|
-
lengthpenalty: data.lengthpenalty ?? 1.0,
|
|
146
|
-
maxlength: data.maxlength ?? 512,
|
|
147
|
-
repetitionpenalty: data.repetitionpenalty ?? 1.0,
|
|
148
|
-
norepeatngramsize: data.norepeatngramsize ?? 0,
|
|
149
|
-
temperature: data.temperature ?? 0.3,
|
|
150
|
-
topk: data.topk ?? 0,
|
|
151
|
-
topp: data.topp ?? 1.0,
|
|
152
46
|
}));
|
|
@@ -12,8 +12,6 @@ export declare const unloadModelResponseSchema: z.ZodObject<{
|
|
|
12
12
|
type: z.ZodLiteral<"unloadModel">;
|
|
13
13
|
success: z.ZodBoolean;
|
|
14
14
|
error: z.ZodOptional<z.ZodString>;
|
|
15
|
-
hasActiveModels: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
hasActiveProviders: z.ZodOptional<z.ZodBoolean>;
|
|
17
15
|
}, z.core.$strip>;
|
|
18
16
|
export type UnloadModelParams = z.input<typeof unloadModelParamsSchema>;
|
|
19
17
|
export type UnloadModelRequest = z.infer<typeof unloadModelRequestSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const whisperConfigSchema: z.ZodObject<{
|
|
3
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
4
|
+
caption: "caption";
|
|
5
|
+
batch: "batch";
|
|
6
|
+
}>>;
|
|
7
|
+
output_format: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
plaintext: "plaintext";
|
|
9
|
+
json: "json";
|
|
10
|
+
}>>;
|
|
11
|
+
min_seconds: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
max_seconds: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
audio_format: z.ZodDefault<z.ZodString>;
|
|
14
|
+
update_frequency: z.ZodDefault<z.ZodString>;
|
|
15
|
+
vadConfig: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
vad_threshold: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
vad_min_speech_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
vad_min_silence_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
vad_max_speech_duration_s: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
vad_speech_pad_ms: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
vad_samples_overlap: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type WhisperConfig = z.infer<typeof whisperConfigSchema>;
|
|
25
|
+
//# sourceMappingURL=whispercpp-config.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const vadConfigSchema = z.object({
|
|
3
|
+
vad_threshold: z.number().optional(),
|
|
4
|
+
vad_min_speech_duration_ms: z.number().optional(),
|
|
5
|
+
vad_min_silence_duration_ms: z.number().optional(),
|
|
6
|
+
vad_max_speech_duration_s: z.number().optional(),
|
|
7
|
+
vad_speech_pad_ms: z.number().optional(),
|
|
8
|
+
vad_samples_overlap: z.number().optional(),
|
|
9
|
+
});
|
|
10
|
+
export const whisperConfigSchema = z.object({
|
|
11
|
+
mode: z.enum(["caption", "batch"]).default("caption"),
|
|
12
|
+
output_format: z.enum(["plaintext", "json"]).default("plaintext"),
|
|
13
|
+
min_seconds: z.number().default(1),
|
|
14
|
+
max_seconds: z.number().default(30),
|
|
15
|
+
audio_format: z.string().default("wav"),
|
|
16
|
+
update_frequency: z.string().default("on_end"),
|
|
17
|
+
vadConfig: vadConfigSchema.optional(),
|
|
18
|
+
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { getModel } from "../registry/model-registry.js";
|
|
2
2
|
import { cancelInferenceBaseSchema, } from "../../../schemas/index.js";
|
|
3
|
-
import { ModelNotLoadedError } from "../../../utils/errors-server.js";
|
|
4
3
|
export async function cancel(params) {
|
|
5
4
|
const { modelId } = cancelInferenceBaseSchema.parse(params);
|
|
6
5
|
const model = getModel(modelId);
|
|
7
6
|
if (!model) {
|
|
8
|
-
throw new
|
|
7
|
+
throw new Error(`Model with ID "${modelId}" is not loaded`);
|
|
9
8
|
}
|
|
10
9
|
if (model.addon && model.addon.cancel) {
|
|
11
10
|
await model.addon.cancel();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AnyModel } from "../../registry/model-registry";
|
|
2
|
+
import type { EmbedConfig, LlmConfig } from "../../../../schemas/index";
|
|
3
|
+
export declare function createLlmModel(modelId: string, modelPath: string, llmConfig: LlmConfig, projectionModelPath?: string): AnyModel;
|
|
4
|
+
export declare function createEmbeddingsModel(modelId: string, modelPath: string, embedConfig: EmbedConfig): AnyModel;
|
|
5
|
+
//# sourceMappingURL=create-model.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import LlmLlamacpp from "@qvac/llm-llamacpp";
|
|
2
|
+
import EmbedLlamacpp from "@qvac/embed-llamacpp";
|
|
3
|
+
import { Readable } from "bare-stream";
|
|
4
|
+
import { createStreamLogger } from "../../../../logging/index.js";
|
|
5
|
+
import { parseModelPath } from "../../../utils/index.js";
|
|
6
|
+
// Mimic qvac-lib-dl-filesystem functionality
|
|
7
|
+
function createFilesystemDLMimic() {
|
|
8
|
+
return {
|
|
9
|
+
dirPath: "./",
|
|
10
|
+
getStream: () => Promise.resolve(Readable.from([])),
|
|
11
|
+
ready: () => Promise.resolve(),
|
|
12
|
+
close: () => Promise.resolve(),
|
|
13
|
+
destroy: () => Promise.resolve(),
|
|
14
|
+
start: () => Promise.resolve(),
|
|
15
|
+
stop: () => Promise.resolve(),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function transformLlmConfig(llmConfig) {
|
|
19
|
+
const transformed = JSON.parse(JSON.stringify(llmConfig, (key, v) => key === "modelType"
|
|
20
|
+
? undefined
|
|
21
|
+
: key === "stop_sequences"
|
|
22
|
+
? Array.isArray(v)
|
|
23
|
+
? v.join(", ")
|
|
24
|
+
: v
|
|
25
|
+
: typeof v === "number" || typeof v === "boolean"
|
|
26
|
+
? String(v)
|
|
27
|
+
: v).replace(/"([a-z][A-Za-z]*)":/g, (_, key) => `"${key.replace(/[A-Z]/g, (l) => `_${l.toLowerCase()}`)}":`));
|
|
28
|
+
// Rename stop_sequences to reverse_prompt for the addon
|
|
29
|
+
if ("stop_sequences" in transformed) {
|
|
30
|
+
transformed["reverse_prompt"] = transformed["stop_sequences"];
|
|
31
|
+
delete transformed["stop_sequences"];
|
|
32
|
+
}
|
|
33
|
+
return transformed;
|
|
34
|
+
}
|
|
35
|
+
export function createLlmModel(modelId, modelPath, llmConfig, projectionModelPath) {
|
|
36
|
+
const { dirPath, basePath } = parseModelPath(modelPath);
|
|
37
|
+
const dl = createFilesystemDLMimic();
|
|
38
|
+
const logger = createStreamLogger(modelId, "llamacpp:llm");
|
|
39
|
+
const llmConfigStrings = transformLlmConfig(llmConfig);
|
|
40
|
+
const args = {
|
|
41
|
+
loader: dl,
|
|
42
|
+
opts: { stats: true },
|
|
43
|
+
logger,
|
|
44
|
+
diskPath: dirPath,
|
|
45
|
+
modelName: basePath,
|
|
46
|
+
projectionModel: projectionModelPath
|
|
47
|
+
? parseModelPath(projectionModelPath).basePath
|
|
48
|
+
: "",
|
|
49
|
+
modelPath,
|
|
50
|
+
modelConfig: llmConfigStrings,
|
|
51
|
+
};
|
|
52
|
+
return new LlmLlamacpp(args, llmConfigStrings);
|
|
53
|
+
}
|
|
54
|
+
export function createEmbeddingsModel(modelId, modelPath, embedConfig) {
|
|
55
|
+
const { dirPath, basePath } = parseModelPath(modelPath);
|
|
56
|
+
const dl = createFilesystemDLMimic();
|
|
57
|
+
const logger = createStreamLogger(modelId, "llamacpp:embed");
|
|
58
|
+
const args = {
|
|
59
|
+
loader: dl,
|
|
60
|
+
opts: { stats: true },
|
|
61
|
+
logger,
|
|
62
|
+
diskPath: dirPath,
|
|
63
|
+
modelName: basePath,
|
|
64
|
+
modelPath,
|
|
65
|
+
};
|
|
66
|
+
return new EmbedLlamacpp(args, embedConfig.config);
|
|
67
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type CompletionStats, type CompletionParams, type Tool, type ToolCall, type ToolCallEvent } from "../../../../../schemas/index";
|
|
2
2
|
export declare function completion(params: CompletionParams & {
|
|
3
3
|
tools?: Tool[];
|
|
4
|
-
generationParams?: GenerationParams;
|
|
5
4
|
}): AsyncGenerator<{
|
|
6
5
|
token: string;
|
|
7
6
|
toolCallEvent?: ToolCallEvent;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { customCacheExists, extractSystemPrompt, findMatchingCache, generateConfigHash, getCacheFilePath, getCurrentCacheInfo, markCacheInitialized, renameCacheFile, } from "../../../ops/kv-cache-utils.js";
|
|
1
|
+
import {} from "../../../../../schemas/index.js";
|
|
3
2
|
import { getModel, getModelConfig, } from "../../../registry/model-registry.js";
|
|
4
|
-
import {
|
|
5
|
-
import { parseToolCalls } from "../../../../utils/tool-parser.js";
|
|
6
|
-
import { AttachmentNotFoundError } from "../../../../../utils/errors-server.js";
|
|
3
|
+
import { findMatchingCache, getCurrentCacheInfo, renameCacheFile, getCacheFilePath, extractSystemPrompt, generateConfigHash, customCacheExists, } from "../kv-cache-utils";
|
|
7
4
|
import fs from "bare-fs";
|
|
5
|
+
import { parseToolCalls, convertToolsToGrammar, } from "../../../../utils/tool-parser.js";
|
|
8
6
|
function transformMessage(message) {
|
|
9
7
|
const transformed = [];
|
|
10
8
|
// Check if it's a tool definition (has type: "function")
|
|
@@ -21,7 +19,7 @@ function transformMessage(message) {
|
|
|
21
19
|
if (msg.attachments && msg.attachments.length > 0) {
|
|
22
20
|
for (const attachment of msg.attachments) {
|
|
23
21
|
if (!fs.existsSync(attachment.path)) {
|
|
24
|
-
throw new
|
|
22
|
+
throw new Error(`Attachment not found at path: ${attachment.path}`);
|
|
25
23
|
}
|
|
26
24
|
transformed.push({
|
|
27
25
|
role: msg.role,
|
|
@@ -43,19 +41,15 @@ function transformMessages(messages) {
|
|
|
43
41
|
}
|
|
44
42
|
return transformed;
|
|
45
43
|
}
|
|
46
|
-
async function initSystemPromptCache(model, cachePathToUse, systemPromptToUse,
|
|
44
|
+
async function initSystemPromptCache(model, cachePathToUse, systemPromptToUse, tools) {
|
|
47
45
|
const primeMessages = [
|
|
48
46
|
{ role: "session", content: cachePathToUse },
|
|
49
47
|
{ role: "system", content: systemPromptToUse },
|
|
50
48
|
];
|
|
51
|
-
let toolCount = 0;
|
|
52
49
|
if (tools && tools.length > 0) {
|
|
53
50
|
const transformedTools = transformMessages(tools);
|
|
54
51
|
primeMessages.push(...transformedTools);
|
|
55
|
-
toolCount = tools.length;
|
|
56
52
|
}
|
|
57
|
-
logCacheInit(cacheKey, systemPromptToUse, toolCount);
|
|
58
|
-
logMessagesToAddon(primeMessages, "CACHE_INIT");
|
|
59
53
|
const primeResponse = await model.run(primeMessages);
|
|
60
54
|
primeResponse.once("output", () => {
|
|
61
55
|
void primeResponse.cancel();
|
|
@@ -78,33 +72,68 @@ function prepareMessagesForCache(cachePathToUse, cacheExists, history) {
|
|
|
78
72
|
...transformedHistoryWithoutSystem,
|
|
79
73
|
];
|
|
80
74
|
}
|
|
81
|
-
async function* processModelResponse(model, messagesToSend, shouldSaveCache, tools
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
75
|
+
async function* processModelResponse(model, messagesToSend, shouldSaveCache, tools) {
|
|
76
|
+
const response = await model.run(messagesToSend);
|
|
77
|
+
// Create a promise that rejects when onError is triggered
|
|
78
|
+
let rejectOnError = null;
|
|
79
|
+
const errorPromise = new Promise((_, reject) => {
|
|
80
|
+
rejectOnError = reject;
|
|
81
|
+
});
|
|
82
|
+
response.onError((error) => {
|
|
83
|
+
if (rejectOnError) {
|
|
84
|
+
rejectOnError(error);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const iterator = response.iterate();
|
|
85
88
|
let accumulatedText = "";
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const toolEvents = checkForToolEvents(accumulatedText, tokenStr, tools, emittedToolCallPositions);
|
|
94
|
-
for (const toolEvent of toolEvents) {
|
|
95
|
-
yield { token: "", toolCallEvent: toolEvent };
|
|
89
|
+
const emittedToolCalls = new Set();
|
|
90
|
+
try {
|
|
91
|
+
while (true) {
|
|
92
|
+
// Race between getting the next token and an error occurring
|
|
93
|
+
const result = await Promise.race([iterator.next(), errorPromise]);
|
|
94
|
+
if (result.done) {
|
|
95
|
+
break;
|
|
96
96
|
}
|
|
97
|
+
const token = result.value;
|
|
98
|
+
accumulatedText += token;
|
|
99
|
+
if (tools && tools.length > 0) {
|
|
100
|
+
const { toolCalls, errors } = parseToolCalls(accumulatedText, tools);
|
|
101
|
+
for (const call of toolCalls) {
|
|
102
|
+
if (!emittedToolCalls.has(call.id)) {
|
|
103
|
+
emittedToolCalls.add(call.id);
|
|
104
|
+
const toolCallEvent = {
|
|
105
|
+
type: "toolCall",
|
|
106
|
+
call,
|
|
107
|
+
};
|
|
108
|
+
yield { token, toolCallEvent };
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
for (const error of errors) {
|
|
113
|
+
const errorKey = `error:${error.code}:${error.message}`;
|
|
114
|
+
if (!emittedToolCalls.has(errorKey)) {
|
|
115
|
+
emittedToolCalls.add(errorKey);
|
|
116
|
+
const toolCallEvent = {
|
|
117
|
+
type: "toolCallError",
|
|
118
|
+
error,
|
|
119
|
+
};
|
|
120
|
+
yield { token, toolCallEvent };
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
yield { token };
|
|
97
126
|
}
|
|
98
127
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
128
|
+
catch (error) {
|
|
129
|
+
if (error instanceof Error) {
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
throw new Error(String(error));
|
|
134
|
+
}
|
|
102
135
|
}
|
|
103
136
|
if (shouldSaveCache) {
|
|
104
|
-
const sessionMsg = messagesToSend.find((m) => m.role === "session");
|
|
105
|
-
if (sessionMsg?.content) {
|
|
106
|
-
logCacheSave(sessionMsg.content);
|
|
107
|
-
}
|
|
108
137
|
await model.run([{ role: "session", content: "save" }]);
|
|
109
138
|
}
|
|
110
139
|
const responseWithStats = response;
|
|
@@ -113,39 +142,49 @@ async function* processModelResponse(model, messagesToSend, shouldSaveCache, too
|
|
|
113
142
|
tokensPerSecond: responseWithStats.stats?.TPS ?? 0,
|
|
114
143
|
cacheTokens: responseWithStats.stats?.CacheTokens ?? 0,
|
|
115
144
|
};
|
|
116
|
-
|
|
145
|
+
const { toolCalls } = parseToolCalls(accumulatedText, tools || []);
|
|
146
|
+
return { stats, toolCalls };
|
|
117
147
|
}
|
|
118
148
|
export async function* completion(params) {
|
|
119
|
-
const { history, modelId, kvCache, tools
|
|
149
|
+
const { history, modelId, kvCache, tools } = params;
|
|
150
|
+
// Check if model was configured with tools support
|
|
120
151
|
const modelConfig = getModelConfig(modelId);
|
|
121
152
|
const toolsEnabled = modelConfig.tools === true;
|
|
122
153
|
let historyWithTools = history;
|
|
123
154
|
if (tools && tools.length > 0 && toolsEnabled) {
|
|
124
|
-
|
|
125
|
-
|
|
155
|
+
// Insert tools after system message (if exists) or at the beginning
|
|
156
|
+
const systemMsgIndex = history.findIndex((msg) => msg.role === "system");
|
|
157
|
+
if (systemMsgIndex >= 0) {
|
|
158
|
+
historyWithTools = [
|
|
159
|
+
...history.slice(0, systemMsgIndex + 1),
|
|
160
|
+
...tools,
|
|
161
|
+
...history.slice(systemMsgIndex + 1),
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
historyWithTools = [...tools, ...history];
|
|
166
|
+
}
|
|
167
|
+
const grammar = convertToolsToGrammar(tools);
|
|
168
|
+
modelConfig.grammar = grammar;
|
|
126
169
|
}
|
|
127
170
|
const transformedHistory = transformMessages(historyWithTools);
|
|
128
171
|
const model = getModel(modelId);
|
|
129
172
|
if (kvCache) {
|
|
130
173
|
const modelConfig = getModelConfig(modelId);
|
|
131
174
|
const systemPromptFromHistory = extractSystemPrompt(history);
|
|
132
|
-
const configHash = generateConfigHash(systemPromptFromHistory, tools);
|
|
175
|
+
const configHash = generateConfigHash(modelConfig, systemPromptFromHistory, tools);
|
|
133
176
|
const systemPromptToUse = systemPromptFromHistory ||
|
|
134
177
|
modelConfig.system_prompt ||
|
|
135
178
|
"You are a helpful assistant.";
|
|
136
179
|
let cachePathToUse;
|
|
137
180
|
if (typeof kvCache === "string") {
|
|
138
181
|
cachePathToUse = await getCacheFilePath(modelId, configHash, kvCache);
|
|
139
|
-
|
|
140
|
-
logCacheStatus(kvCache, cacheExists);
|
|
182
|
+
const cacheExists = await customCacheExists(modelId, configHash, kvCache);
|
|
141
183
|
if (!cacheExists) {
|
|
142
|
-
await initSystemPromptCache(model, cachePathToUse, systemPromptToUse,
|
|
143
|
-
markCacheInitialized(modelId, configHash, kvCache);
|
|
144
|
-
cacheExists = true;
|
|
184
|
+
await initSystemPromptCache(model, cachePathToUse, systemPromptToUse, tools && toolsEnabled ? tools : undefined);
|
|
145
185
|
}
|
|
146
186
|
const messagesToSend = prepareMessagesForCache(cachePathToUse, cacheExists, history);
|
|
147
|
-
|
|
148
|
-
return yield* processModelResponse(model, messagesToSend, true, tools, generationParams);
|
|
187
|
+
return yield* processModelResponse(model, messagesToSend, true, tools);
|
|
149
188
|
}
|
|
150
189
|
else {
|
|
151
190
|
// Auto-generate cache key based on conversation history
|
|
@@ -160,16 +199,12 @@ export async function* completion(params) {
|
|
|
160
199
|
existingCache !== null
|
|
161
200
|
? existingCache.cachePath
|
|
162
201
|
: currentCacheInfo.cachePath;
|
|
163
|
-
|
|
164
|
-
logCacheStatus("auto", cacheExists);
|
|
202
|
+
const cacheExists = existingCache !== null;
|
|
165
203
|
if (!cacheExists) {
|
|
166
|
-
await initSystemPromptCache(model, cachePathToUse, systemPromptToUse,
|
|
167
|
-
markCacheInitialized(modelId, configHash, currentCacheInfo.cacheKey);
|
|
168
|
-
cacheExists = true;
|
|
204
|
+
await initSystemPromptCache(model, cachePathToUse, systemPromptToUse, tools && toolsEnabled ? tools : undefined);
|
|
169
205
|
}
|
|
170
206
|
const messagesToSend = prepareMessagesForCache(cachePathToUse, cacheExists, history);
|
|
171
|
-
|
|
172
|
-
const result = yield* processModelResponse(model, messagesToSend, true, tools, generationParams);
|
|
207
|
+
const result = yield* processModelResponse(model, messagesToSend, true, tools);
|
|
173
208
|
//If there was an existing cache, we rename it with new hash that includes the current message
|
|
174
209
|
if (existingCache !== null &&
|
|
175
210
|
existingCache.cachePath !== currentCacheInfo.cachePath) {
|
|
@@ -179,8 +214,6 @@ export async function* completion(params) {
|
|
|
179
214
|
}
|
|
180
215
|
}
|
|
181
216
|
else {
|
|
182
|
-
|
|
183
|
-
logMessagesToAddon(transformedHistory, "NO_CACHE");
|
|
184
|
-
return yield* processModelResponse(model, transformedHistory, false, tools, generationParams);
|
|
217
|
+
return yield* processModelResponse(model, transformedHistory, false, tools);
|
|
185
218
|
}
|
|
186
219
|
}
|
|
@@ -1,37 +1,22 @@
|
|
|
1
|
-
import { getModel } from "
|
|
2
|
-
import { embedParamsSchema } from "
|
|
3
|
-
import { EmbedNoEmbeddingsError, EmbedFailedError, } from "../../../utils/errors-server.js";
|
|
1
|
+
import { getModel } from "../../../registry/model-registry.js";
|
|
2
|
+
import { embedParamsSchema } from "../../../../../schemas/index.js";
|
|
4
3
|
export async function embed(params) {
|
|
5
4
|
const { modelId, text } = embedParamsSchema.parse(params);
|
|
6
5
|
const model = getModel(modelId);
|
|
7
6
|
const response = await model.run(text);
|
|
8
7
|
const rawEmbeddings = (await response.await());
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
throw new EmbedNoEmbeddingsError();
|
|
13
|
-
}
|
|
14
|
-
return embeddingsArray.map((embeddingVector) => {
|
|
15
|
-
if (!embeddingVector || embeddingVector.length === 0) {
|
|
16
|
-
throw new EmbedNoEmbeddingsError();
|
|
17
|
-
}
|
|
18
|
-
return normalizeVector(embeddingVector);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const embeddingVector = embeddingsArray?.[0];
|
|
23
|
-
if (!embeddingVector || embeddingVector.length === 0) {
|
|
24
|
-
throw new EmbedNoEmbeddingsError();
|
|
25
|
-
}
|
|
26
|
-
return normalizeVector(embeddingVector);
|
|
8
|
+
const embeddingVector = rawEmbeddings?.[0]?.[0];
|
|
9
|
+
if (!embeddingVector || embeddingVector.length === 0) {
|
|
10
|
+
throw new Error("No embeddings returned");
|
|
27
11
|
}
|
|
12
|
+
return normalizeVector(embeddingVector);
|
|
28
13
|
}
|
|
29
14
|
export function normalizeVector(vector) {
|
|
30
15
|
let sumOfSquares = 0;
|
|
31
16
|
for (let i = 0; i < vector.length; i++) {
|
|
32
17
|
const value = vector[i];
|
|
33
18
|
if (!Number.isFinite(value)) {
|
|
34
|
-
throw new
|
|
19
|
+
throw new Error(`NormalizeVector: non-finite value at index ${i}: ${value}`);
|
|
35
20
|
}
|
|
36
21
|
sumOfSquares += value * value;
|
|
37
22
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare function markCacheInitialized(modelId: string, configHash: string, cacheKey: string): void;
|
|
2
|
-
export declare function isCacheInitialized(modelId: string, configHash: string, cacheKey: string): boolean;
|
|
3
|
-
export declare function clearCacheRegistry(cacheKey?: string): void;
|
|
4
1
|
export interface CacheMessage {
|
|
5
2
|
role: string;
|
|
6
3
|
content: string;
|
|
@@ -9,7 +6,7 @@ export interface CacheMessage {
|
|
|
9
6
|
}[] | undefined;
|
|
10
7
|
}
|
|
11
8
|
export declare function extractSystemPrompt(messages: CacheMessage[]): string | null;
|
|
12
|
-
export declare function generateConfigHash(systemPrompt: string | null, tools?: unknown): string;
|
|
9
|
+
export declare function generateConfigHash(modelConfig: unknown, systemPrompt: string | null, tools?: unknown): string;
|
|
13
10
|
export declare function generateCacheKey(messages: CacheMessage[]): string;
|
|
14
11
|
export declare function getCacheFilePath(modelId: string, configHash: string, cacheKey: string): Promise<string>;
|
|
15
12
|
export declare function findMatchingCache(modelId: string, configHash: string, currentHistory: CacheMessage[]): Promise<{
|