@qvac/sdk 0.8.1 → 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 -22
- package/dist/client/api/cancel.js +6 -25
- 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 +2 -6
- package/dist/client/api/index.js +2 -6
- 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 +11 -0
- package/dist/client/api/ping.js +18 -0
- 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.d.ts +2 -0
- package/dist/examples/embed-hyperdrive.js +19 -0
- 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.d.ts +2 -0
- package/dist/examples/{llamacpp-p2p.js → 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/seed-hyperdrive.d.ts +2 -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 -18
- package/dist/schemas/cancel.js +0 -7
- package/dist/schemas/common.d.ts +166 -3012
- package/dist/schemas/common.js +4 -27
- package/dist/schemas/completion-stream.d.ts +60 -31
- package/dist/schemas/completion-stream.js +44 -20
- package/dist/schemas/delegate.d.ts +0 -9
- package/dist/schemas/delegate.js +2 -6
- 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 +2 -20
- package/dist/schemas/index.js +2 -20
- 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 -14471
- 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/ping.d.ts +11 -0
- package/dist/schemas/ping.js +8 -0
- 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 +45 -187
- 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 -16
- package/dist/server/bare/registry/model-registry.js +13 -34
- 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 +8 -20
- 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 +20 -60
- 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 -148
- package/NOTICE +0 -695
- 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/heartbeat.d.ts +0 -30
- package/dist/client/api/heartbeat.js +0 -38
- 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/embed-p2p.d.ts +0 -2
- package/dist/examples/embed-p2p.js +0 -54
- package/dist/examples/llamacpp-p2p.d.ts +0 -2
- 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/seed-p2p.d.ts +0 -2
- 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/heartbeat.d.ts +0 -17
- package/dist/schemas/heartbeat.js +0 -10
- 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 -201
- 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 -236
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
- package/dist/server/rpc/handler-registry.d.ts +0 -3
- package/dist/server/rpc/handler-registry.js +0 -113
- package/dist/server/rpc/handler-utils.d.ts +0 -23
- package/dist/server/rpc/handler-utils.js +0 -170
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/cancel-delegated.js +0 -71
- 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/heartbeat-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/heartbeat-delegated.js +0 -32
- package/dist/server/rpc/handlers/heartbeat.d.ts +0 -3
- package/dist/server/rpc/handlers/heartbeat.js +0 -3
- 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 -548
- 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/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/{seed-p2p.js → seed-hyperdrive.js} +0 -0
- /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
package/README.md
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
[](https://tether-2.gitbook.io/qvac-by-tether-or-reference/y2AsIh94H9DJ1pIBCNj9)
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
**QVAC** is an open-source, cross-platform
|
|
5
|
+
**QVAC** is an open-source, cross-platform system for building local-first, peer-to-peer **AI applications**. QVAC runs on [**Bare**](https://bare.pears.com) by [Holepunch](https://holepunch.to), a lightweight, cross-platform JavaScript runtime.
|
|
6
6
|
|
|
7
7
|
# QVAC SDK
|
|
8
8
|
|
|
9
|
-
**QVAC SDK** is the canonical entry point to
|
|
9
|
+
**QVAC SDK** is the canonical entry point to QVAC. Written in TypeScript, it provides all QVAC capabilities through a unified interface while also abstracting away the complexity of running your application in a JS environment other than Bare.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
> <br>
|
|
13
|
-
> <sup>
|
|
14
|
-
> <a href="https://qvac.tether.dev" >Home</a> •
|
|
15
|
-
> <a href="https://qvac.tether.dev/docs" >Docs</a> •
|
|
16
|
-
> <a href="https://qvacbytether.featurebase.app" >Support</a> •
|
|
17
|
-
> <a href="https://discord.com/invite/tetherdev" >Discord</a>
|
|
18
|
-
> </sup>
|
|
19
|
-
|
|
20
|
-
Written in TypeScript, it provides all QVAC capabilities through a unified interface while also abstracting away the complexity of running your application in a JS environment other than Bare.
|
|
21
|
-
|
|
22
|
-
For the comprehensive reference, [see official QVAC documentation](https://qvac.tether.dev/docs).
|
|
11
|
+
For the comprehensive reference, [see official QVAC documentation](https://tether-2.gitbook.io/qvac-by-tether-or-reference/y2AsIh94H9DJ1pIBCNj9).
|
|
23
12
|
|
|
24
13
|
## Requirements
|
|
25
14
|
|
|
@@ -27,29 +16,65 @@ Supported JS environments: Bare, Node.js, Expo and Bun.
|
|
|
27
16
|
|
|
28
17
|
## Installation
|
|
29
18
|
|
|
19
|
+
### Steps
|
|
20
|
+
|
|
21
|
+
1. [Authenticate to Tether’s GitHub packages](#step-1-authenticate-to-tethers-github-packages)
|
|
22
|
+
2. [Install package and dependencies](#step-2-install-package-and-dependencies)
|
|
23
|
+
|
|
24
|
+
### Step 1: authenticate to Tether’s GitHub packages
|
|
25
|
+
|
|
26
|
+
1. [Create a GitHub personal access token (classic) with scope `read:packages`](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
|
|
27
|
+
|
|
28
|
+
2. Add the token to your environment variables. For example, on macOS/Linux:
|
|
29
|
+
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
export NPM_TOKEN=<token_generated_in_previous_step>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
3. In the root of your project, create file `.npmrc` with the following content:
|
|
35
|
+
|
|
36
|
+
```ini
|
|
37
|
+
@qvac:registry=https://registry.npmjs.org
|
|
38
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
32
39
|
```
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
_Alternatively, you can create the `.npmrc` file in your home directory, for user-level (global) configuration._
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
4. Confirm authentication to Tether’s GitHub packages:
|
|
37
44
|
|
|
38
45
|
```bash
|
|
39
|
-
|
|
46
|
+
npm whoami --registry=https://npm.pkg.github.com
|
|
40
47
|
```
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
It should return your GitHub username.
|
|
50
|
+
|
|
51
|
+
### Step 2: Install package and dependencies
|
|
43
52
|
|
|
44
|
-
1.
|
|
53
|
+
1. Install in your project using the package manager of your choice:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm i @qvac/sdk
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
> [!TIP]
|
|
60
|
+
> If you can't get the package via Tether's private GitHub package registry, see section [Build from source](#build-from-source).
|
|
61
|
+
|
|
62
|
+
#### On Linux
|
|
63
|
+
|
|
64
|
+
> [!IMPORTANT]
|
|
65
|
+
> If you're on Linux ensure that the Vulkan SDK is installed (e.g. `apt install vulkan-sdk` on Ubuntu)
|
|
66
|
+
|
|
67
|
+
#### On Expo
|
|
68
|
+
|
|
69
|
+
1. Install the peer dependencies for Expo/React Native support:
|
|
45
70
|
|
|
46
71
|
```bash
|
|
47
72
|
npm i expo-file-system react-native-bare-kit
|
|
48
73
|
```
|
|
49
74
|
|
|
50
|
-
2.
|
|
75
|
+
2. If you are on Android, bump your `minSdkVersion` to 29. You can do so by adding `ext { minSdkVersion=29 }` to your `android/build.gradle` or by using `expo-build-properties`.
|
|
51
76
|
|
|
52
|
-
3. Add the QVAC Expo plugin to `app.json`:
|
|
77
|
+
3. Add the QVAC Expo plugin to your `app.json`:
|
|
53
78
|
|
|
54
79
|
```js
|
|
55
80
|
export default {
|
|
@@ -76,81 +101,78 @@ npx expo run:android --device
|
|
|
76
101
|
> [!IMPORTANT]
|
|
77
102
|
> Due to limitations with `llamacpp`, QVAC currently does not run on emulators. You **must** use a physical device.
|
|
78
103
|
|
|
79
|
-
##
|
|
104
|
+
## Quickstart
|
|
105
|
+
|
|
106
|
+
You can run the self-contained example below:
|
|
80
107
|
|
|
81
108
|
```js
|
|
82
|
-
import {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
VERBOSITY,
|
|
89
|
-
} from "@qvac/sdk";
|
|
90
|
-
try {
|
|
91
|
-
// First just cache the model
|
|
92
|
-
await downloadAsset({
|
|
93
|
-
assetSrc: LLAMA_3_2_1B_INST_Q4_0,
|
|
94
|
-
onProgress: (progress) => {
|
|
95
|
-
console.log(progress);
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
// Then load it in memory from cache
|
|
99
|
-
const modelId = await loadModel({
|
|
100
|
-
modelSrc: LLAMA_3_2_1B_INST_Q4_0,
|
|
109
|
+
import { loadModel, completion, unloadModel } from "@qvac/sdk";
|
|
110
|
+
|
|
111
|
+
// Load model into memory
|
|
112
|
+
const modelId = await loadModel(
|
|
113
|
+
"pear://afa79ee07c0a138bb9f11bfaee771fb1bdfca8c82d961cff0474e49827bd1de3/Llama-3.2-1B-Instruct-Q4_0.gguf",
|
|
114
|
+
{
|
|
101
115
|
modelType: "llm",
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
// Use the loaded model
|
|
120
|
+
const response = completion({
|
|
121
|
+
modelId,
|
|
122
|
+
history: [{ role: "user", content: "What is the capital of France?" }],
|
|
123
|
+
stream: false,
|
|
124
|
+
});
|
|
125
|
+
const text = await response.text;
|
|
126
|
+
console.log(text);
|
|
127
|
+
|
|
128
|
+
// Enable KV cache for faster subsequent completions
|
|
129
|
+
const cachedResponse = completion({
|
|
130
|
+
modelId,
|
|
131
|
+
history: [
|
|
132
|
+
{ role: "user", content: "What is the capital of France?" },
|
|
133
|
+
{ role: "assistant", content: "The capital of France is Paris." },
|
|
134
|
+
{ role: "user", content: "What about Germany?" },
|
|
135
|
+
],
|
|
136
|
+
stream: true,
|
|
137
|
+
kvCache: true, // enables caching for faster inference
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// You can use the loaded model multiple times
|
|
141
|
+
|
|
142
|
+
// Unload model to free up system resources
|
|
143
|
+
await unloadModel({ modelId });
|
|
144
|
+
process.exit();
|
|
126
145
|
```
|
|
127
146
|
|
|
128
|
-
|
|
147
|
+
**For more on how to use QVAC SDK, see [SDK at QVAC documentation](https://tether-2.gitbook.io/qvac-by-tether-or-reference/y2AsIh94H9DJ1pIBCNj9/sdk)**.
|
|
129
148
|
|
|
130
|
-
|
|
149
|
+
## Build from source
|
|
131
150
|
|
|
132
|
-
|
|
133
|
-
- Transcription: speech-to-text (ASR) via [`whisper.cpp`](https://github.com/ggml-org/whisper.cpp).
|
|
134
|
-
- Text embeddings: via `llama.cpp`, for RAG.
|
|
135
|
-
- Translation: between different languages.
|
|
136
|
-
- Text-to-Speech: TTS via ONNX.
|
|
137
|
-
- Multimodal: via [`llama.cpp`] — i.e., process and understand multiple types of media within the same conversation context.
|
|
138
|
-
- RAG: retrieval-augmented generation with progress streaming, cancellation, and workspace management.
|
|
139
|
-
- Delegated inference: perform peer-to-peer edge inference via Holepunch stack.
|
|
151
|
+
Use the [Bun](https://bun.sh/) package manager:
|
|
140
152
|
|
|
141
|
-
|
|
153
|
+
```bash
|
|
154
|
+
bun i
|
|
155
|
+
```
|
|
142
156
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
157
|
+
```bash
|
|
158
|
+
bun run build # or `watch` for hotreload
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
bun run build:pack
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This outputs a tarball under `dist/qvac-sdk-{version}.tgz` that you can install in your project, e.g.:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm i path/to/qvac-sdk-0.3.0.tgz
|
|
169
|
+
```
|
|
148
170
|
|
|
149
171
|
## Examples
|
|
150
172
|
|
|
151
|
-
In the `./examples` subdirectory, you will find scripts demonstrating
|
|
173
|
+
In the `./examples` subdirectory, you will find scripts demonstrating SDK usage. To try any of them:
|
|
152
174
|
|
|
153
|
-
1.
|
|
175
|
+
1. Follow the steps in section [Build from source](#build-from-source).
|
|
154
176
|
2. Run using Bare, Node.js, or Bun as the runtime:
|
|
155
177
|
|
|
156
178
|
```bash
|
|
@@ -164,327 +186,123 @@ node dist/examples/path/to/example.js
|
|
|
164
186
|
bun run examples/path/to/example.ts
|
|
165
187
|
```
|
|
166
188
|
|
|
167
|
-
|
|
189
|
+
## Logging
|
|
168
190
|
|
|
169
|
-
-
|
|
170
|
-
- `llama.cpp` with P2P registry: [`examples/llamacpp-p2p.ts`](examples/llamacpp-p2p.ts)
|
|
171
|
-
- `llama.cpp` with HTTP: [`examples/llamacpp-http.ts`](examples/llamacpp-http.ts)
|
|
172
|
-
- `llama.cpp` with tools/function calls: [`examples/llamacpp-native-tools.ts`](examples/llamacpp-native-tools.ts)
|
|
173
|
-
- `llama.cpp` with multimodal inference: [`examples/llamacpp-multimodal.ts`](examples/llamacpp-multimodal.ts)
|
|
174
|
-
- `llama.cpp` with KV cache: [`examples/kv-cache-example.ts`](examples/kv-cache-example.ts)
|
|
175
|
-
|
|
176
|
-
### Transcription
|
|
177
|
-
|
|
178
|
-
- `whisper.cpp` transcription: [`examples/whispercpp-filesystem.ts`](examples/whispercpp-filesystem.ts)
|
|
179
|
-
- Microphone recording: [`examples/whispercpp-microphone-record.ts`](examples/whispercpp-microphone-record.ts)
|
|
180
|
-
|
|
181
|
-
### Embeddings
|
|
182
|
-
|
|
183
|
-
- Single and batch embeddings: [`examples/embed-p2p.ts`](examples/embed-p2p.ts)
|
|
184
|
-
|
|
185
|
-
**RAG with HyperDB** (cross-platform):
|
|
186
|
-
|
|
187
|
-
- Ingest (full pipeline): [`examples/rag/rag-hyperdb/ingest.ts`](examples/rag/rag-hyperdb/ingest.ts)
|
|
188
|
-
- Segregated pipeline: [`examples/rag/rag-hyperdb/pipeline.ts`](examples/rag/rag-hyperdb/pipeline.ts) _(Segregated flow: chunk → embed → save)_
|
|
189
|
-
- Workspaces: [`examples/rag/rag-hyperdb/workspaces.ts`](examples/rag/rag-hyperdb/workspaces.ts) _(Workspace lifecycle: list, close, delete)_
|
|
190
|
-
- Cancellation: [`examples/rag/rag-hyperdb/cancellation.ts`](examples/rag/rag-hyperdb/cancellation.ts) _(progress + cancel)_
|
|
191
|
+
QVAC SDK includes built-in log propagation that streams model logs from the worker process to your client application in real-time. This gives you visibility into what's happening inside your models during loading, inference, and other operations.
|
|
191
192
|
|
|
192
|
-
|
|
193
|
+
### Usage
|
|
193
194
|
|
|
194
|
-
|
|
195
|
-
- ChromaDB: [`examples/rag/rag-chromadb.ts`](examples/rag/rag-chromadb.ts) _(requires ChromaDB server)_
|
|
196
|
-
- SQLite-Vector: [`examples/rag/rag-sqlite.ts`](examples/rag/rag-sqlite.ts) _(SQLite-Vector WASM)_
|
|
197
|
-
|
|
198
|
-
### Translation
|
|
199
|
-
|
|
200
|
-
- Marian OPUS translation: [`examples/translation/translation-opus.ts`](examples/translation/translation-opus.ts)
|
|
201
|
-
- Indic language translation: [`examples/translation/translation-indic.ts`](examples/translation/translation-indic.ts)
|
|
202
|
-
- LLM-based translation: [`examples/translation/translation-llm.ts`](examples/translation/translation-llm.ts)
|
|
203
|
-
|
|
204
|
-
### Text-to-Speech
|
|
205
|
-
|
|
206
|
-
- TTS (Chatterbox): [`examples/tts/chatterbox.ts`](examples/tts/chatterbox.ts) _(voice cloning with reference audio)_
|
|
207
|
-
- TTS (Supertonic): [`examples/tts/supertonic.ts`](examples/tts/supertonic.ts) _(general-purpose, no voice cloning)_
|
|
208
|
-
|
|
209
|
-
### Multimodel
|
|
210
|
-
|
|
211
|
-
- Load multiple models simultaneously: [`examples/multi-model-demo.ts`](examples/multi-model-demo.ts)
|
|
212
|
-
|
|
213
|
-
### Delegated inference
|
|
195
|
+
Simply pass a logger when loading your model:
|
|
214
196
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```ts
|
|
229
|
-
import { loggingStream, SDK_LOG_ID } from "@qvac/sdk";
|
|
197
|
+
```js
|
|
198
|
+
import { getLogger, loadModel, completion, unloadModel } from "@qvac/sdk";
|
|
199
|
+
|
|
200
|
+
// Create a logger for your application
|
|
201
|
+
const logger = getLogger("my-app", {
|
|
202
|
+
level: "debug", // Set log level
|
|
203
|
+
transports: [
|
|
204
|
+
// Optional: add custom log handlers
|
|
205
|
+
(level, namespace, message) => {
|
|
206
|
+
console.log(`[${level.toUpperCase()}] ${namespace}: ${message}`);
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
});
|
|
230
210
|
|
|
231
|
-
//
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
211
|
+
// Load model with logging - RPC stream starts automatically
|
|
212
|
+
const modelId = await loadModel(
|
|
213
|
+
"pear://afa79ee07c0a138bb9f11bfaee771fb1bdfca8c82d961cff0474e49827bd1de3/Llama-3.2-1B-Instruct-Q4_0.gguf",
|
|
214
|
+
{
|
|
215
|
+
modelType: "llm",
|
|
216
|
+
logger, // Enable log streaming
|
|
217
|
+
},
|
|
218
|
+
);
|
|
235
219
|
|
|
236
|
-
//
|
|
237
|
-
for await (const
|
|
238
|
-
|
|
220
|
+
// Now you'll see model logs in your console as operations happen
|
|
221
|
+
for await (const token of completion({
|
|
222
|
+
modelId,
|
|
223
|
+
history: [{ role: "user", content: "Hello!" }],
|
|
224
|
+
}).tokenStream) {
|
|
225
|
+
process.stdout.write(token);
|
|
239
226
|
}
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
- Log streaming: [`examples/logging-streaming.ts`](examples/logging-streaming.ts)
|
|
243
|
-
- Log with custom file transport: [`examples/logging-file-transport.ts`](examples/logging-file-transport.ts)
|
|
244
|
-
|
|
245
|
-
### Configuration
|
|
246
|
-
|
|
247
|
-
Customize SDK behavior using a config file. The SDK auto-discovers `qvac.config.{json,js,ts}` in your project root, or you can specify a path via `QVAC_CONFIG_PATH` environment variable.
|
|
248
|
-
|
|
249
|
-
**Supported formats:**
|
|
250
|
-
|
|
251
|
-
- `qvac.config.json` - JSON format
|
|
252
|
-
- `qvac.config.js` - JavaScript with `export default`
|
|
253
|
-
- `qvac.config.ts` - TypeScript with `export default`
|
|
254
|
-
|
|
255
|
-
**Available options:**
|
|
256
|
-
|
|
257
|
-
| Option | Type | Default | Description |
|
|
258
|
-
| ------------------------- | ---------- | ---------------- | --------------------------------------------------- |
|
|
259
|
-
| `cacheDirectory` | `string` | `~/.qvac/models` | Where models and assets are stored |
|
|
260
|
-
| `swarmRelays` | `string[]` | `[]` | Hyperswarm relay public keys for P2P |
|
|
261
|
-
| `loggerLevel` | `string` | `"info"` | Log level: `"error"`, `"warn"`, `"info"`, `"debug"` |
|
|
262
|
-
| `loggerConsoleOutput` | `boolean` | `true` | Enable/disable console output |
|
|
263
|
-
| `httpDownloadConcurrency` | `number` | `3` | Max concurrent HTTP downloads for sharded models |
|
|
264
|
-
| `httpConnectionTimeoutMs` | `number` | `10000` | HTTP connection timeout in milliseconds |
|
|
265
|
-
|
|
266
|
-
- Config usage example: [`examples/default-config-usage.ts`](examples/default-config-usage.ts)
|
|
267
|
-
|
|
268
|
-
### Download Lifecycle
|
|
269
|
-
|
|
270
|
-
- Pause and resume download: [`examples/download-with-cancel.ts`](examples/download-with-cancel.ts)
|
|
271
|
-
|
|
272
|
-
### Blind Relays
|
|
273
|
-
|
|
274
|
-
Blind relays help establish peer connections through NAT/firewalls by routing traffic through relay nodes.
|
|
275
|
-
|
|
276
|
-
- Model downloads via Hyperdrive: [`examples/download-with-blind-relays.ts`](./examples/download-with-blind-relays.ts)
|
|
277
|
-
- Delegated inference: You can reuse the same pattern for delegated inference by adding `swarmRelays` to your config file before starting your provider/consumer.
|
|
278
|
-
|
|
279
|
-
> [!NOTE]
|
|
280
|
-
> The examples use mock relay keys. For real deployments, you **must** use your own relay servers or trusted public relays.
|
|
281
|
-
|
|
282
|
-
### Sharded Models
|
|
283
|
-
|
|
284
|
-
Sharded models are split into multiple files following the pattern: `<name>-00001-of-0000X.<ext>`. The SDK automatically downloads and loads all parts with detailed progress tracking.
|
|
285
|
-
|
|
286
|
-
**Supported formats:**
|
|
287
|
-
|
|
288
|
-
- Archives (`.tar`, `.tar.gz`, `.tgz`): HTTP or local with automatic extraction
|
|
289
|
-
- HTTP sharded URL: pass the download URL of any shard and the SDK will fetch the remaining shards
|
|
290
|
-
- Hyperdrive: use any sharded Hyperdrive model source
|
|
291
|
-
- Local shards: pass the path to any shard file. _(Note: All shards must be in the same directory)_
|
|
292
|
-
|
|
293
|
-
See: [`examples/llamacpp-sharded.ts`](examples/llamacpp-sharded.ts)
|
|
294
|
-
|
|
295
|
-
## Basic flow
|
|
296
|
-
|
|
297
|
-
```mermaid
|
|
298
|
-
sequenceDiagram
|
|
299
|
-
participant User as User
|
|
300
|
-
participant SDK as QVAC SDK
|
|
301
|
-
participant RPC as RPC Client (singleton)
|
|
302
|
-
participant Worker as Bare Worker (singleton)
|
|
303
|
-
|
|
304
|
-
User->>SDK: Call loadModel("llama-3", options)
|
|
305
|
-
SDK->>RPC: Create runtime-specific RPC client
|
|
306
|
-
RPC->>Worker: Spawn worker (if needed) and send loadModel request
|
|
307
|
-
Worker->>Worker: Download and load model into memory
|
|
308
|
-
Worker->>RPC: Return success response
|
|
309
|
-
RPC->>SDK: Model loaded successfully
|
|
310
|
-
SDK->>User: loadModel() resolves with modelId
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
**Note**: The example uses mock relay keys. In real deployments, you **must** use your own relay servers or trusted public relays.
|
|
314
|
-
|
|
315
|
-
### Hot Config Reload
|
|
316
|
-
|
|
317
|
-
Hot config reload allows you to update model configurations on-the-fly without unloading the model. Pass `modelId` (instead of `modelSrc`) to `loadModel` with the `modelType` and new `modelConfig` to apply changes instantly.
|
|
318
|
-
|
|
319
|
-
- Config reload using whisper: [`examples/config-reload.ts`](examples/config-reload.ts)
|
|
320
|
-
|
|
321
|
-
**Note**: Config reload is currently supported for Whisper models. All config parameters except `contextParams` (GPU settings, flash attention) can be hot reloaded. `contextParams` are load-time only and require full model reload. More model types coming soon.
|
|
322
|
-
|
|
323
|
-
## Contributing
|
|
324
|
-
|
|
325
|
-
### Commit Message and PR Title Format
|
|
326
|
-
|
|
327
|
-
This repository enforces structured commit messages and PR titles to maintain consistency and generate changelogs automatically.
|
|
328
|
-
|
|
329
|
-
#### Format
|
|
330
|
-
|
|
331
|
-
**Commit messages:**
|
|
332
227
|
|
|
228
|
+
await unloadModel({ modelId }); // Logging stream closes automatically
|
|
333
229
|
```
|
|
334
|
-
prefix[tags]?: subject
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**PR titles:**
|
|
338
|
-
|
|
339
|
-
```
|
|
340
|
-
TICKET prefix[tags]: subject
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
#### Allowed Prefixes
|
|
344
230
|
|
|
345
|
-
|
|
346
|
-
- `fix` - Bug fixes
|
|
347
|
-
- `doc` - Documentation changes
|
|
348
|
-
- `test` - Test additions or modifications
|
|
349
|
-
- `mod` - Model-related changes
|
|
350
|
-
- `chore` - Maintenance tasks
|
|
351
|
-
- `infra` - CI/CD, tooling, infrastructure
|
|
231
|
+
### What You'll See
|
|
352
232
|
|
|
353
|
-
|
|
233
|
+
When logging is enabled, you'll see real-time logs from the underlying model libraries:
|
|
354
234
|
|
|
355
|
-
Tags are optional:
|
|
356
|
-
|
|
357
|
-
- `[api]` - API changes (non-breaking)
|
|
358
|
-
- `[bc]` - Breaking changes (including breaking API changes)
|
|
359
|
-
|
|
360
|
-
#### Examples
|
|
361
|
-
|
|
362
|
-
**Valid commit messages:**
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
feat: add RAG support for LanceDB
|
|
366
|
-
fix[api]: fix completion stream error handling
|
|
367
|
-
doc: update installation instructions
|
|
368
|
-
feat[bc]: redesign loadModel signature
|
|
369
|
-
chore: update dependencies
|
|
370
235
|
```
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
QVAC-123 feat: add RAG support for LanceDB
|
|
376
|
-
QVAC-456 fix[api]: fix completion stream error handling
|
|
377
|
-
QVAC-789 doc: update installation instructions
|
|
378
|
-
QVAC-101 feat[bc]: redesign loadModel signature
|
|
236
|
+
[DEBUG] llamacpp:llm: Loading model weights...
|
|
237
|
+
[INFO] llamacpp:llm: Model loaded successfully, vocab_size=32000
|
|
238
|
+
[DEBUG] llamacpp:llm: Starting inference...
|
|
239
|
+
[DEBUG] llamacpp:llm: Inference completed, tokens=12
|
|
379
240
|
```
|
|
380
241
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
When creating PRs with specific tags, you must include code examples in the PR description:
|
|
384
|
-
|
|
385
|
-
**`[bc]` tag requirements:**
|
|
386
|
-
|
|
387
|
-
Must include BEFORE/AFTER code examples showing the migration path:
|
|
242
|
+
This works for all model types (LLM, Whisper, NMT, Embeddings) and provides valuable insight into model performance and behavior.
|
|
388
243
|
|
|
389
|
-
|
|
390
|
-
## BC Changes
|
|
391
|
-
|
|
392
|
-
**BEFORE:**
|
|
393
|
-
|
|
394
|
-
```typescript
|
|
395
|
-
const model = await loadModel("model-path");
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
**AFTER:**
|
|
399
|
-
|
|
400
|
-
```typescript
|
|
401
|
-
const modelId = await loadModel("model-path", { modelType: "llm" });
|
|
402
|
-
```
|
|
403
|
-
````
|
|
404
|
-
|
|
405
|
-
Or using inline comments:
|
|
406
|
-
|
|
407
|
-
````markdown
|
|
408
|
-
```typescript
|
|
409
|
-
// old
|
|
410
|
-
const model = await loadModel("model-path");
|
|
411
|
-
|
|
412
|
-
// new
|
|
413
|
-
const modelId = await loadModel("model-path", { modelType: "llm" });
|
|
414
|
-
```
|
|
415
|
-
````
|
|
244
|
+
### Completion
|
|
416
245
|
|
|
417
|
-
|
|
246
|
+
- `llama.cpp` with local files: [`examples/llamacpp-filesystem.ts`](examples/llamacpp-filesystem.ts)
|
|
247
|
+
- `llama.cpp` with Hyperdrive: [`examples/llamacpp-hyperdrive.ts`](examples/llamacpp-hyperdrive.ts)
|
|
248
|
+
- `llama.cpp` with HTTP: [`examples/llamacpp-http.ts`](examples/llamacpp-http.ts)
|
|
249
|
+
- `llama.cpp` with file logging: [`examples/llamacpp-file-logging.ts`](examples/llamacpp-file-logging.ts)
|
|
250
|
+
- `llama.cpp` with tools/function calls: [`examples/llamacpp-tools.ts`](examples/llamacpp-tools.ts)
|
|
251
|
+
- `llama.cpp` with tools and routing: [`examples/llamacpp-tools-routing.ts`](examples/llamacpp-tools-routing.ts)
|
|
252
|
+
- `llama.cpp` with multimodal inference: [`examples/llamacpp-multimodal.ts`](examples/llamacpp-multimodal.ts)
|
|
253
|
+
- `llama.cpp` with KV cache: [`examples/kv-cache-example.ts`](examples/kv-cache-example.ts)
|
|
418
254
|
|
|
419
|
-
|
|
255
|
+
### Transcription
|
|
420
256
|
|
|
421
|
-
|
|
422
|
-
|
|
257
|
+
- `whisper.cpp` transcription: [`examples/whispercpp-transcription.ts`](examples/whispercpp-transcription.ts)
|
|
258
|
+
- Microphone recording: [`examples/microphone-record-transcription.ts`](examples/microphone-record-transcription.ts)
|
|
423
259
|
|
|
424
|
-
|
|
425
|
-
// New completion API with streaming support
|
|
426
|
-
for await (const token of completion({
|
|
427
|
-
modelId,
|
|
428
|
-
history: [{ role: "user", content: "Hello!" }],
|
|
429
|
-
}).tokenStream) {
|
|
430
|
-
process.stdout.write(token);
|
|
431
|
-
}
|
|
432
|
-
```
|
|
433
|
-
````
|
|
434
|
-
|
|
435
|
-
#### Validation
|
|
260
|
+
### Embeddings
|
|
436
261
|
|
|
437
|
-
-
|
|
438
|
-
-
|
|
439
|
-
-
|
|
440
|
-
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
- Revert commits (e.g., `Revert "feat: add feature"`)
|
|
444
|
-
- Squash commits (e.g., `squash! fix: bug fix`)
|
|
262
|
+
- Embedding with Hyperdrive: [`examples/embed-hyperdrive.ts`](examples/embed-hyperdrive.ts)
|
|
263
|
+
- RAG example with HyperDB: [`examples/rag-hyperdb.ts`](examples/rag-hyperdb.ts)
|
|
264
|
+
- RAG with workspaces: [`examples/rag-hyperdb-workspaces.ts`](examples/rag-hyperdb-workspaces.ts) _(Demonstrates workspace isolation and chunking)_
|
|
265
|
+
- RAG example with LanceDB (desktop only): [`examples/rag-lancedb.ts`](examples/rag-lancedb.ts)
|
|
266
|
+
- RAG example with ChromaDB (desktop only): [`examples/rag-chromadb.ts`](examples/rag-chromadb.ts) _(Note: Requires ChromaDB server running)_
|
|
267
|
+
- RAG example with SQLite-Vector (desktop only): [`examples/rag-sqlite.ts`](examples/rag-sqlite.ts) _(Note: Uses SQLite-Vector WASM)_
|
|
445
268
|
|
|
446
|
-
|
|
269
|
+
### Translation
|
|
447
270
|
|
|
448
|
-
|
|
271
|
+
- Marian OPUS translation: [`examples/translation-opus.ts`](examples/translation-opus.ts)
|
|
272
|
+
- Indic language translation: [`examples/translation-indic.ts`](examples/translation-indic.ts)
|
|
273
|
+
- LLM-based translation: [`examples/translation-llm.ts`](examples/translation-llm.ts)
|
|
449
274
|
|
|
450
|
-
|
|
451
|
-
npm run changelog:generate
|
|
452
|
-
```
|
|
275
|
+
### Text to Speech
|
|
453
276
|
|
|
454
|
-
|
|
277
|
+
- Text to Speech: [`examples/text-to-speech.ts`](examples/text-to-speech.ts)
|
|
455
278
|
|
|
456
|
-
|
|
457
|
-
2. Collect all merged PRs
|
|
458
|
-
3. Parse and classify each PR by prefix
|
|
459
|
-
4. Generate `changelog/<version>/CHANGELOG.md`
|
|
460
|
-
5. Generate `changelog/<version>/breaking.md` for BC changes (with code examples)
|
|
461
|
-
6. Generate `changelog/<version>/api.md` for API changes (with code examples)
|
|
279
|
+
**Note**: To run the text-to-speech example, espeak data is required which can be obtained from [here](https://github.com/espeak-ng/espeak-ng).
|
|
462
280
|
|
|
463
|
-
|
|
281
|
+
### Multimodel
|
|
464
282
|
|
|
465
|
-
|
|
283
|
+
- Load multiple models simultaneously: [`examples/multi-model-demo.ts`](examples/multi-model-demo.ts)
|
|
466
284
|
|
|
467
|
-
|
|
285
|
+
### Delegated inference
|
|
468
286
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
```
|
|
287
|
+
- Provider example: [`examples/delegated-inference/provider.ts`](examples/delegated-inference/provider.ts)
|
|
288
|
+
- Consumer example: [`examples/delegated-inference/consumer.ts`](examples/delegated-inference/consumer.ts)
|
|
472
289
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
```
|
|
290
|
+
**Note**: Set the `QVAC_HYPERSWARM_SEED` env var to ensure that the provider's uses the same keypair (i.e. the public key doesn't change on every run).
|
|
291
|
+
**Note**: ⚠️ Consumer does not handle reconnection yet.
|
|
476
292
|
|
|
477
|
-
|
|
478
|
-
bun run build:pack
|
|
479
|
-
```
|
|
293
|
+
### Download Lifecycle
|
|
480
294
|
|
|
481
|
-
|
|
295
|
+
- Pause and resume download: [`examples/download-with-cancel.ts`](examples/download-with-cancel.ts)
|
|
482
296
|
|
|
483
|
-
|
|
484
|
-
npm i path/to/sdk-0.3.0.tgz
|
|
485
|
-
```
|
|
297
|
+
## Known issues
|
|
486
298
|
|
|
487
|
-
|
|
299
|
+
- **One off scripts don't terminate / hang**
|
|
300
|
+
- Add a `process.exit()` call at the end, we're working on it.
|
|
488
301
|
|
|
489
|
-
-
|
|
490
|
-
-
|
|
302
|
+
- **I'm building my Expo app on iOS but I don't see logs from QVAC**
|
|
303
|
+
- `npx expo start`
|
|
304
|
+
- Open the `ios` folder in Xcode
|
|
305
|
+
- Start the app with the play ▶️ button
|
|
306
|
+
- View -> Debug area -> Activate console
|
|
307
|
+
- You should see the system logs on the right pane
|
|
308
|
+
- ⚠️ This only works when starting the app from Xcode
|