@trymirai/uzu 0.3.0 → 0.4.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 +1 -1
- package/README.md +253 -245
- package/index.d.mts +1 -43
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -43
- package/index.d.ts.map +1 -1
- package/index.js +2 -88
- package/index.js.map +1 -1
- package/index.mjs +1 -43
- package/index.mjs.map +1 -1
- package/internal/tslib.js +6 -33
- package/napi/index.d.ts +975 -0
- package/napi/index.js +626 -0
- package/napi/index.mjs +3 -0
- package/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
- package/package.json +26 -63
- package/src/index.ts +1 -43
- package/src/napi/index.d.ts +975 -0
- package/src/napi/index.js +626 -0
- package/src/napi/index.mjs +3 -0
- package/src/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/bridging/asyncBatchSize.d.mts +0 -10
- package/bridging/asyncBatchSize.d.mts.map +0 -1
- package/bridging/asyncBatchSize.d.ts +0 -10
- package/bridging/asyncBatchSize.d.ts.map +0 -1
- package/bridging/asyncBatchSize.js +0 -21
- package/bridging/asyncBatchSize.js.map +0 -1
- package/bridging/asyncBatchSize.mjs +0 -17
- package/bridging/asyncBatchSize.mjs.map +0 -1
- package/bridging/chatSession.d.mts +0 -11
- package/bridging/chatSession.d.mts.map +0 -1
- package/bridging/chatSession.d.ts +0 -11
- package/bridging/chatSession.d.ts.map +0 -1
- package/bridging/chatSession.js +0 -22
- package/bridging/chatSession.js.map +0 -1
- package/bridging/chatSession.mjs +0 -18
- package/bridging/chatSession.mjs.map +0 -1
- package/bridging/classificationFeature.d.mts +0 -9
- package/bridging/classificationFeature.d.mts.map +0 -1
- package/bridging/classificationFeature.d.ts +0 -9
- package/bridging/classificationFeature.d.ts.map +0 -1
- package/bridging/classificationFeature.js +0 -18
- package/bridging/classificationFeature.js.map +0 -1
- package/bridging/classificationFeature.mjs +0 -14
- package/bridging/classificationFeature.mjs.map +0 -1
- package/bridging/classificationLabel.d.mts +0 -12
- package/bridging/classificationLabel.d.mts.map +0 -1
- package/bridging/classificationLabel.d.ts +0 -12
- package/bridging/classificationLabel.d.ts.map +0 -1
- package/bridging/classificationLabel.js +0 -26
- package/bridging/classificationLabel.js.map +0 -1
- package/bridging/classificationLabel.mjs +0 -22
- package/bridging/classificationLabel.mjs.map +0 -1
- package/bridging/classificationOutput.d.mts +0 -10
- package/bridging/classificationOutput.d.mts.map +0 -1
- package/bridging/classificationOutput.d.ts +0 -10
- package/bridging/classificationOutput.d.ts.map +0 -1
- package/bridging/classificationOutput.js +0 -16
- package/bridging/classificationOutput.js.map +0 -1
- package/bridging/classificationOutput.mjs +0 -12
- package/bridging/classificationOutput.mjs.map +0 -1
- package/bridging/classificationSession.d.mts +0 -9
- package/bridging/classificationSession.d.mts.map +0 -1
- package/bridging/classificationSession.d.ts +0 -9
- package/bridging/classificationSession.d.ts.map +0 -1
- package/bridging/classificationSession.js +0 -16
- package/bridging/classificationSession.js.map +0 -1
- package/bridging/classificationSession.mjs +0 -12
- package/bridging/classificationSession.mjs.map +0 -1
- package/bridging/classificationStats.d.mts +0 -14
- package/bridging/classificationStats.d.mts.map +0 -1
- package/bridging/classificationStats.d.ts +0 -14
- package/bridging/classificationStats.d.ts.map +0 -1
- package/bridging/classificationStats.js +0 -20
- package/bridging/classificationStats.js.map +0 -1
- package/bridging/classificationStats.mjs +0 -16
- package/bridging/classificationStats.mjs.map +0 -1
- package/bridging/config.d.mts +0 -26
- package/bridging/config.d.mts.map +0 -1
- package/bridging/config.d.ts +0 -26
- package/bridging/config.d.ts.map +0 -1
- package/bridging/config.js +0 -53
- package/bridging/config.js.map +0 -1
- package/bridging/config.mjs +0 -49
- package/bridging/config.mjs.map +0 -1
- package/bridging/contextLength.d.mts +0 -11
- package/bridging/contextLength.d.mts.map +0 -1
- package/bridging/contextLength.d.ts +0 -11
- package/bridging/contextLength.d.ts.map +0 -1
- package/bridging/contextLength.js +0 -25
- package/bridging/contextLength.js.map +0 -1
- package/bridging/contextLength.mjs +0 -21
- package/bridging/contextLength.mjs.map +0 -1
- package/bridging/contextMode.d.mts +0 -12
- package/bridging/contextMode.d.mts.map +0 -1
- package/bridging/contextMode.d.ts +0 -12
- package/bridging/contextMode.d.ts.map +0 -1
- package/bridging/contextMode.js +0 -26
- package/bridging/contextMode.js.map +0 -1
- package/bridging/contextMode.mjs +0 -22
- package/bridging/contextMode.mjs.map +0 -1
- package/bridging/downloadHandle.d.mts +0 -14
- package/bridging/downloadHandle.d.mts.map +0 -1
- package/bridging/downloadHandle.d.ts +0 -14
- package/bridging/downloadHandle.d.ts.map +0 -1
- package/bridging/downloadHandle.js +0 -36
- package/bridging/downloadHandle.js.map +0 -1
- package/bridging/downloadHandle.mjs +0 -32
- package/bridging/downloadHandle.mjs.map +0 -1
- package/bridging/downloadProgressUpdate.d.mts +0 -9
- package/bridging/downloadProgressUpdate.d.mts.map +0 -1
- package/bridging/downloadProgressUpdate.d.ts +0 -9
- package/bridging/downloadProgressUpdate.d.ts.map +0 -1
- package/bridging/downloadProgressUpdate.js +0 -15
- package/bridging/downloadProgressUpdate.js.map +0 -1
- package/bridging/downloadProgressUpdate.mjs +0 -11
- package/bridging/downloadProgressUpdate.mjs.map +0 -1
- package/bridging/downloadState.d.mts +0 -19
- package/bridging/downloadState.d.mts.map +0 -1
- package/bridging/downloadState.d.ts +0 -19
- package/bridging/downloadState.d.ts.map +0 -1
- package/bridging/downloadState.js +0 -45
- package/bridging/downloadState.js.map +0 -1
- package/bridging/downloadState.mjs +0 -41
- package/bridging/downloadState.mjs.map +0 -1
- package/bridging/engine.d.mts +0 -29
- package/bridging/engine.d.mts.map +0 -1
- package/bridging/engine.d.ts +0 -29
- package/bridging/engine.d.ts.map +0 -1
- package/bridging/engine.js +0 -117
- package/bridging/engine.js.map +0 -1
- package/bridging/engine.mjs +0 -113
- package/bridging/engine.mjs.map +0 -1
- package/bridging/finishReason.d.mts +0 -7
- package/bridging/finishReason.d.mts.map +0 -1
- package/bridging/finishReason.d.ts +0 -7
- package/bridging/finishReason.d.ts.map +0 -1
- package/bridging/finishReason.js +0 -11
- package/bridging/finishReason.js.map +0 -1
- package/bridging/finishReason.mjs +0 -8
- package/bridging/finishReason.mjs.map +0 -1
- package/bridging/grammarConfig.d.mts +0 -13
- package/bridging/grammarConfig.d.mts.map +0 -1
- package/bridging/grammarConfig.d.ts +0 -13
- package/bridging/grammarConfig.d.ts.map +0 -1
- package/bridging/grammarConfig.js +0 -36
- package/bridging/grammarConfig.js.map +0 -1
- package/bridging/grammarConfig.mjs +0 -31
- package/bridging/grammarConfig.mjs.map +0 -1
- package/bridging/input.d.mts +0 -11
- package/bridging/input.d.mts.map +0 -1
- package/bridging/input.d.ts +0 -11
- package/bridging/input.d.ts.map +0 -1
- package/bridging/input.js +0 -25
- package/bridging/input.js.map +0 -1
- package/bridging/input.mjs +0 -21
- package/bridging/input.mjs.map +0 -1
- package/bridging/licenseStatus.d.mts +0 -14
- package/bridging/licenseStatus.d.mts.map +0 -1
- package/bridging/licenseStatus.d.ts +0 -14
- package/bridging/licenseStatus.d.ts.map +0 -1
- package/bridging/licenseStatus.js +0 -42
- package/bridging/licenseStatus.js.map +0 -1
- package/bridging/licenseStatus.mjs +0 -38
- package/bridging/licenseStatus.mjs.map +0 -1
- package/bridging/message.d.mts +0 -15
- package/bridging/message.d.mts.map +0 -1
- package/bridging/message.d.ts +0 -15
- package/bridging/message.d.ts.map +0 -1
- package/bridging/message.js +0 -43
- package/bridging/message.js.map +0 -1
- package/bridging/message.mjs +0 -39
- package/bridging/message.mjs.map +0 -1
- package/bridging/model.d.mts +0 -19
- package/bridging/model.d.mts.map +0 -1
- package/bridging/model.d.ts +0 -19
- package/bridging/model.d.ts.map +0 -1
- package/bridging/model.js +0 -39
- package/bridging/model.js.map +0 -1
- package/bridging/model.mjs +0 -35
- package/bridging/model.mjs.map +0 -1
- package/bridging/modelKind.d.mts +0 -8
- package/bridging/modelKind.d.mts.map +0 -1
- package/bridging/modelKind.d.ts +0 -8
- package/bridging/modelKind.d.ts.map +0 -1
- package/bridging/modelKind.js +0 -30
- package/bridging/modelKind.js.map +0 -1
- package/bridging/modelKind.mjs +0 -25
- package/bridging/modelKind.mjs.map +0 -1
- package/bridging/modelType.d.mts +0 -9
- package/bridging/modelType.d.mts.map +0 -1
- package/bridging/modelType.d.ts +0 -9
- package/bridging/modelType.d.ts.map +0 -1
- package/bridging/modelType.js +0 -35
- package/bridging/modelType.js.map +0 -1
- package/bridging/modelType.mjs +0 -30
- package/bridging/modelType.mjs.map +0 -1
- package/bridging/napi.d.mts +0 -4
- package/bridging/napi.d.mts.map +0 -1
- package/bridging/napi.d.ts +0 -4
- package/bridging/napi.d.ts.map +0 -1
- package/bridging/napi.js +0 -3
- package/bridging/napi.js.map +0 -1
- package/bridging/napi.mjs +0 -2
- package/bridging/napi.mjs.map +0 -1
- package/bridging/output.d.mts +0 -13
- package/bridging/output.d.mts.map +0 -1
- package/bridging/output.d.ts +0 -13
- package/bridging/output.d.ts.map +0 -1
- package/bridging/output.js +0 -36
- package/bridging/output.js.map +0 -1
- package/bridging/output.mjs +0 -32
- package/bridging/output.mjs.map +0 -1
- package/bridging/parsedText.d.mts +0 -10
- package/bridging/parsedText.d.mts.map +0 -1
- package/bridging/parsedText.d.ts +0 -10
- package/bridging/parsedText.d.ts.map +0 -1
- package/bridging/parsedText.js +0 -24
- package/bridging/parsedText.js.map +0 -1
- package/bridging/parsedText.mjs +0 -20
- package/bridging/parsedText.mjs.map +0 -1
- package/bridging/prefillStepSize.d.mts +0 -11
- package/bridging/prefillStepSize.d.mts.map +0 -1
- package/bridging/prefillStepSize.d.ts +0 -11
- package/bridging/prefillStepSize.d.ts.map +0 -1
- package/bridging/prefillStepSize.js +0 -28
- package/bridging/prefillStepSize.js.map +0 -1
- package/bridging/prefillStepSize.mjs +0 -24
- package/bridging/prefillStepSize.mjs.map +0 -1
- package/bridging/preset.d.mts +0 -14
- package/bridging/preset.d.mts.map +0 -1
- package/bridging/preset.d.ts +0 -14
- package/bridging/preset.d.ts.map +0 -1
- package/bridging/preset.js +0 -41
- package/bridging/preset.js.map +0 -1
- package/bridging/preset.mjs +0 -37
- package/bridging/preset.mjs.map +0 -1
- package/bridging/role.d.mts +0 -6
- package/bridging/role.d.mts.map +0 -1
- package/bridging/role.d.ts +0 -6
- package/bridging/role.d.ts.map +0 -1
- package/bridging/role.js +0 -10
- package/bridging/role.js.map +0 -1
- package/bridging/role.mjs +0 -7
- package/bridging/role.mjs.map +0 -1
- package/bridging/runConfig.d.mts +0 -18
- package/bridging/runConfig.d.mts.map +0 -1
- package/bridging/runConfig.d.ts +0 -18
- package/bridging/runConfig.d.ts.map +0 -1
- package/bridging/runConfig.js +0 -42
- package/bridging/runConfig.js.map +0 -1
- package/bridging/runConfig.mjs +0 -38
- package/bridging/runConfig.mjs.map +0 -1
- package/bridging/runStats.d.mts +0 -8
- package/bridging/runStats.d.mts.map +0 -1
- package/bridging/runStats.d.ts +0 -8
- package/bridging/runStats.d.ts.map +0 -1
- package/bridging/runStats.js +0 -16
- package/bridging/runStats.js.map +0 -1
- package/bridging/runStats.mjs +0 -12
- package/bridging/runStats.mjs.map +0 -1
- package/bridging/samplingMethod.d.mts +0 -11
- package/bridging/samplingMethod.d.mts.map +0 -1
- package/bridging/samplingMethod.d.ts +0 -11
- package/bridging/samplingMethod.d.ts.map +0 -1
- package/bridging/samplingMethod.js +0 -37
- package/bridging/samplingMethod.js.map +0 -1
- package/bridging/samplingMethod.mjs +0 -33
- package/bridging/samplingMethod.mjs.map +0 -1
- package/bridging/samplingPolicy.d.mts +0 -11
- package/bridging/samplingPolicy.d.mts.map +0 -1
- package/bridging/samplingPolicy.d.ts +0 -11
- package/bridging/samplingPolicy.d.ts.map +0 -1
- package/bridging/samplingPolicy.js +0 -25
- package/bridging/samplingPolicy.js.map +0 -1
- package/bridging/samplingPolicy.mjs +0 -21
- package/bridging/samplingPolicy.mjs.map +0 -1
- package/bridging/samplingProcessingOrder.d.mts +0 -8
- package/bridging/samplingProcessingOrder.d.mts.map +0 -1
- package/bridging/samplingProcessingOrder.d.ts +0 -8
- package/bridging/samplingProcessingOrder.d.ts.map +0 -1
- package/bridging/samplingProcessingOrder.js +0 -30
- package/bridging/samplingProcessingOrder.js.map +0 -1
- package/bridging/samplingProcessingOrder.mjs +0 -25
- package/bridging/samplingProcessingOrder.mjs.map +0 -1
- package/bridging/samplingSeed.d.mts +0 -10
- package/bridging/samplingSeed.d.mts.map +0 -1
- package/bridging/samplingSeed.d.ts +0 -10
- package/bridging/samplingSeed.d.ts.map +0 -1
- package/bridging/samplingSeed.js +0 -21
- package/bridging/samplingSeed.js.map +0 -1
- package/bridging/samplingSeed.mjs +0 -17
- package/bridging/samplingSeed.mjs.map +0 -1
- package/bridging/stats.d.mts +0 -11
- package/bridging/stats.d.mts.map +0 -1
- package/bridging/stats.d.ts +0 -11
- package/bridging/stats.d.ts.map +0 -1
- package/bridging/stats.js +0 -20
- package/bridging/stats.js.map +0 -1
- package/bridging/stats.mjs +0 -16
- package/bridging/stats.mjs.map +0 -1
- package/bridging/stepStats.d.mts +0 -14
- package/bridging/stepStats.d.mts.map +0 -1
- package/bridging/stepStats.d.ts +0 -14
- package/bridging/stepStats.d.ts.map +0 -1
- package/bridging/stepStats.js +0 -27
- package/bridging/stepStats.js.map +0 -1
- package/bridging/stepStats.mjs +0 -23
- package/bridging/stepStats.mjs.map +0 -1
- package/bridging/text.d.mts +0 -9
- package/bridging/text.d.mts.map +0 -1
- package/bridging/text.d.ts +0 -9
- package/bridging/text.d.ts.map +0 -1
- package/bridging/text.js +0 -17
- package/bridging/text.js.map +0 -1
- package/bridging/text.mjs +0 -13
- package/bridging/text.mjs.map +0 -1
- package/bridging/textToSpeechSession.d.mts +0 -8
- package/bridging/textToSpeechSession.d.mts.map +0 -1
- package/bridging/textToSpeechSession.d.ts +0 -8
- package/bridging/textToSpeechSession.d.ts.map +0 -1
- package/bridging/textToSpeechSession.js +0 -14
- package/bridging/textToSpeechSession.js.map +0 -1
- package/bridging/textToSpeechSession.mjs +0 -10
- package/bridging/textToSpeechSession.mjs.map +0 -1
- package/bridging/totalStats.d.mts +0 -9
- package/bridging/totalStats.d.mts.map +0 -1
- package/bridging/totalStats.d.ts +0 -9
- package/bridging/totalStats.d.ts.map +0 -1
- package/bridging/totalStats.js +0 -18
- package/bridging/totalStats.js.map +0 -1
- package/bridging/totalStats.mjs +0 -14
- package/bridging/totalStats.mjs.map +0 -1
- package/error.d.mts +0 -18
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -18
- package/error.d.ts.map +0 -1
- package/error.js +0 -46
- package/error.js.map +0 -1
- package/error.mjs +0 -41
- package/error.mjs.map +0 -1
- package/interactors/chatModelInteractor.d.mts +0 -34
- package/interactors/chatModelInteractor.d.mts.map +0 -1
- package/interactors/chatModelInteractor.d.ts +0 -34
- package/interactors/chatModelInteractor.d.ts.map +0 -1
- package/interactors/chatModelInteractor.js +0 -93
- package/interactors/chatModelInteractor.js.map +0 -1
- package/interactors/chatModelInteractor.mjs +0 -89
- package/interactors/chatModelInteractor.mjs.map +0 -1
- package/interactors/chatModelsInteractor.d.mts +0 -12
- package/interactors/chatModelsInteractor.d.mts.map +0 -1
- package/interactors/chatModelsInteractor.d.ts +0 -12
- package/interactors/chatModelsInteractor.d.ts.map +0 -1
- package/interactors/chatModelsInteractor.js +0 -25
- package/interactors/chatModelsInteractor.js.map +0 -1
- package/interactors/chatModelsInteractor.mjs +0 -21
- package/interactors/chatModelsInteractor.mjs.map +0 -1
- package/interactors/chatSessionInteractor.d.mts +0 -26
- package/interactors/chatSessionInteractor.d.mts.map +0 -1
- package/interactors/chatSessionInteractor.d.ts +0 -26
- package/interactors/chatSessionInteractor.d.ts.map +0 -1
- package/interactors/chatSessionInteractor.js +0 -54
- package/interactors/chatSessionInteractor.js.map +0 -1
- package/interactors/chatSessionInteractor.mjs +0 -50
- package/interactors/chatSessionInteractor.mjs.map +0 -1
- package/interactors/downloadInteractor.d.mts +0 -16
- package/interactors/downloadInteractor.d.mts.map +0 -1
- package/interactors/downloadInteractor.d.ts +0 -16
- package/interactors/downloadInteractor.d.ts.map +0 -1
- package/interactors/downloadInteractor.js +0 -38
- package/interactors/downloadInteractor.js.map +0 -1
- package/interactors/downloadInteractor.mjs +0 -34
- package/interactors/downloadInteractor.mjs.map +0 -1
- package/interactors/engineInteractor.d.mts +0 -15
- package/interactors/engineInteractor.d.mts.map +0 -1
- package/interactors/engineInteractor.d.ts +0 -15
- package/interactors/engineInteractor.d.ts.map +0 -1
- package/interactors/engineInteractor.js +0 -30
- package/interactors/engineInteractor.js.map +0 -1
- package/interactors/engineInteractor.mjs +0 -26
- package/interactors/engineInteractor.mjs.map +0 -1
- package/interactors/interactor.d.mts +0 -6
- package/interactors/interactor.d.mts.map +0 -1
- package/interactors/interactor.d.ts +0 -6
- package/interactors/interactor.d.ts.map +0 -1
- package/interactors/interactor.js +0 -3
- package/interactors/interactor.js.map +0 -1
- package/interactors/interactor.mjs +0 -2
- package/interactors/interactor.mjs.map +0 -1
- package/napi/uzu.d.ts +0 -325
- package/napi/uzu.js +0 -121
- package/napi/uzu.mjs +0 -74
- package/src/bridging/asyncBatchSize.ts +0 -24
- package/src/bridging/chatSession.ts +0 -28
- package/src/bridging/classificationFeature.ts +0 -20
- package/src/bridging/classificationLabel.ts +0 -43
- package/src/bridging/classificationOutput.ts +0 -22
- package/src/bridging/classificationSession.ts +0 -17
- package/src/bridging/classificationStats.ts +0 -45
- package/src/bridging/config.ts +0 -122
- package/src/bridging/contextLength.ts +0 -29
- package/src/bridging/contextMode.ts +0 -31
- package/src/bridging/downloadHandle.ts +0 -41
- package/src/bridging/downloadProgressUpdate.ts +0 -21
- package/src/bridging/downloadState.ts +0 -62
- package/src/bridging/engine.ts +0 -141
- package/src/bridging/finishReason.ts +0 -6
- package/src/bridging/grammarConfig.ts +0 -40
- package/src/bridging/input.ts +0 -29
- package/src/bridging/licenseStatus.ts +0 -39
- package/src/bridging/message.ts +0 -50
- package/src/bridging/model.ts +0 -68
- package/src/bridging/modelKind.ts +0 -27
- package/src/bridging/modelType.ts +0 -32
- package/src/bridging/napi.ts +0 -3
- package/src/bridging/output.ts +0 -40
- package/src/bridging/parsedText.ts +0 -27
- package/src/bridging/prefillStepSize.ts +0 -32
- package/src/bridging/preset.ts +0 -48
- package/src/bridging/role.ts +0 -5
- package/src/bridging/runConfig.ts +0 -57
- package/src/bridging/runStats.ts +0 -17
- package/src/bridging/samplingMethod.ts +0 -49
- package/src/bridging/samplingPolicy.ts +0 -29
- package/src/bridging/samplingProcessingOrder.ts +0 -31
- package/src/bridging/samplingSeed.ts +0 -24
- package/src/bridging/stats.ts +0 -22
- package/src/bridging/stepStats.ts +0 -49
- package/src/bridging/text.ts +0 -18
- package/src/bridging/textToSpeechSession.ts +0 -15
- package/src/bridging/totalStats.ts +0 -20
- package/src/error.ts +0 -42
- package/src/interactors/chatModelInteractor.ts +0 -126
- package/src/interactors/chatModelsInteractor.ts +0 -29
- package/src/interactors/chatSessionInteractor.ts +0 -80
- package/src/interactors/downloadInteractor.ts +0 -47
- package/src/interactors/engineInteractor.ts +0 -38
- package/src/interactors/interactor.ts +0 -7
- package/src/napi/uzu.d.ts +0 -325
- package/src/napi/uzu.js +0 -121
- package/src/napi/uzu.mjs +0 -74
- package/src/utilities/env.ts +0 -9
- package/utilities/env.d.mts +0 -2
- package/utilities/env.d.mts.map +0 -1
- package/utilities/env.d.ts +0 -2
- package/utilities/env.d.ts.map +0 -1
- package/utilities/env.js +0 -14
- package/utilities/env.js.map +0 -1
- package/utilities/env.mjs +0 -10
- package/utilities/env.mjs.map +0 -1
package/bridging/config.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Config = void 0;
|
|
4
|
-
const asyncBatchSize_1 = require("./asyncBatchSize.js");
|
|
5
|
-
const contextLength_1 = require("./contextLength.js");
|
|
6
|
-
const contextMode_1 = require("./contextMode.js");
|
|
7
|
-
const prefillStepSize_1 = require("./prefillStepSize.js");
|
|
8
|
-
const preset_1 = require("./preset.js");
|
|
9
|
-
const samplingSeed_1 = require("./samplingSeed.js");
|
|
10
|
-
class Config {
|
|
11
|
-
constructor(preset, contextMode, contextLength, prefillStepSize, samplingSeed, asyncBatchSize) {
|
|
12
|
-
this.preset = preset;
|
|
13
|
-
this.contextMode = contextMode;
|
|
14
|
-
this.contextLength = contextLength;
|
|
15
|
-
this.prefillStepSize = prefillStepSize;
|
|
16
|
-
this.samplingSeed = samplingSeed;
|
|
17
|
-
this.asyncBatchSize = asyncBatchSize;
|
|
18
|
-
}
|
|
19
|
-
static default() {
|
|
20
|
-
return new Config(preset_1.Preset.general(), contextMode_1.ContextMode.none(), contextLength_1.ContextLength.default(), prefillStepSize_1.PrefillStepSize.default(), samplingSeed_1.SamplingSeed.default(), asyncBatchSize_1.AsyncBatchSize.default());
|
|
21
|
-
}
|
|
22
|
-
withPreset(preset) {
|
|
23
|
-
return new Config(preset, this.contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
24
|
-
}
|
|
25
|
-
withContextMode(contextMode) {
|
|
26
|
-
return new Config(this.preset, contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
27
|
-
}
|
|
28
|
-
withContextLength(contextLength) {
|
|
29
|
-
return new Config(this.preset, this.contextMode, contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
30
|
-
}
|
|
31
|
-
withPrefillStepSize(prefillStepSize) {
|
|
32
|
-
return new Config(this.preset, this.contextMode, this.contextLength, prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
33
|
-
}
|
|
34
|
-
withSamplingSeed(samplingSeed) {
|
|
35
|
-
return new Config(this.preset, this.contextMode, this.contextLength, this.prefillStepSize, samplingSeed, this.asyncBatchSize);
|
|
36
|
-
}
|
|
37
|
-
withAsyncBatchSize(asyncBatchSize) {
|
|
38
|
-
return new Config(this.preset, this.contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, asyncBatchSize);
|
|
39
|
-
}
|
|
40
|
-
toNapi() {
|
|
41
|
-
const napiConfig = {
|
|
42
|
-
preset: this.preset.toNapi(),
|
|
43
|
-
contextMode: this.contextMode.toNapi(),
|
|
44
|
-
contextLength: this.contextLength.toNapi(),
|
|
45
|
-
prefillStepSize: this.prefillStepSize.toNapi(),
|
|
46
|
-
samplingSeed: this.samplingSeed.toNapi(),
|
|
47
|
-
asyncBatchSize: this.asyncBatchSize.toNapi(),
|
|
48
|
-
};
|
|
49
|
-
return napiConfig;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.Config = Config;
|
|
53
|
-
//# sourceMappingURL=config.js.map
|
package/bridging/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/bridging/config.ts"],"names":[],"mappings":"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"}
|
package/bridging/config.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { AsyncBatchSize } from "./asyncBatchSize.mjs";
|
|
2
|
-
import { ContextLength } from "./contextLength.mjs";
|
|
3
|
-
import { ContextMode } from "./contextMode.mjs";
|
|
4
|
-
import { PrefillStepSize } from "./prefillStepSize.mjs";
|
|
5
|
-
import { Preset } from "./preset.mjs";
|
|
6
|
-
import { SamplingSeed } from "./samplingSeed.mjs";
|
|
7
|
-
export class Config {
|
|
8
|
-
constructor(preset, contextMode, contextLength, prefillStepSize, samplingSeed, asyncBatchSize) {
|
|
9
|
-
this.preset = preset;
|
|
10
|
-
this.contextMode = contextMode;
|
|
11
|
-
this.contextLength = contextLength;
|
|
12
|
-
this.prefillStepSize = prefillStepSize;
|
|
13
|
-
this.samplingSeed = samplingSeed;
|
|
14
|
-
this.asyncBatchSize = asyncBatchSize;
|
|
15
|
-
}
|
|
16
|
-
static default() {
|
|
17
|
-
return new Config(Preset.general(), ContextMode.none(), ContextLength.default(), PrefillStepSize.default(), SamplingSeed.default(), AsyncBatchSize.default());
|
|
18
|
-
}
|
|
19
|
-
withPreset(preset) {
|
|
20
|
-
return new Config(preset, this.contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
21
|
-
}
|
|
22
|
-
withContextMode(contextMode) {
|
|
23
|
-
return new Config(this.preset, contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
24
|
-
}
|
|
25
|
-
withContextLength(contextLength) {
|
|
26
|
-
return new Config(this.preset, this.contextMode, contextLength, this.prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
27
|
-
}
|
|
28
|
-
withPrefillStepSize(prefillStepSize) {
|
|
29
|
-
return new Config(this.preset, this.contextMode, this.contextLength, prefillStepSize, this.samplingSeed, this.asyncBatchSize);
|
|
30
|
-
}
|
|
31
|
-
withSamplingSeed(samplingSeed) {
|
|
32
|
-
return new Config(this.preset, this.contextMode, this.contextLength, this.prefillStepSize, samplingSeed, this.asyncBatchSize);
|
|
33
|
-
}
|
|
34
|
-
withAsyncBatchSize(asyncBatchSize) {
|
|
35
|
-
return new Config(this.preset, this.contextMode, this.contextLength, this.prefillStepSize, this.samplingSeed, asyncBatchSize);
|
|
36
|
-
}
|
|
37
|
-
toNapi() {
|
|
38
|
-
const napiConfig = {
|
|
39
|
-
preset: this.preset.toNapi(),
|
|
40
|
-
contextMode: this.contextMode.toNapi(),
|
|
41
|
-
contextLength: this.contextLength.toNapi(),
|
|
42
|
-
prefillStepSize: this.prefillStepSize.toNapi(),
|
|
43
|
-
samplingSeed: this.samplingSeed.toNapi(),
|
|
44
|
-
asyncBatchSize: this.asyncBatchSize.toNapi(),
|
|
45
|
-
};
|
|
46
|
-
return napiConfig;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=config.mjs.map
|
package/bridging/config.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","sourceRoot":"","sources":["../src/bridging/config.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE;OAClB,EAAE,aAAa,EAAE;OACjB,EAAE,WAAW,EAAE;OAEf,EAAE,eAAe,EAAE;OACnB,EAAE,MAAM,EAAE;OACV,EAAE,YAAY,EAAE;AAEvB,MAAM,OAAO,MAAM;IAQf,YACI,MAAc,EACd,WAAwB,EACxB,aAA4B,EAC5B,eAAgC,EAChC,YAA0B,EAC1B,cAA8B;QAE9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,MAAM,CACb,MAAM,CAAC,OAAO,EAAE,EAChB,WAAW,CAAC,IAAI,EAAE,EAClB,aAAa,CAAC,OAAO,EAAE,EACvB,eAAe,CAAC,OAAO,EAAE,EACzB,YAAY,CAAC,OAAO,EAAE,EACtB,cAAc,CAAC,OAAO,EAAE,CAC3B,CAAC;IACN,CAAC;IAED,UAAU,CAAC,MAAc;QACrB,OAAO,IAAI,MAAM,CACb,MAAM,EACN,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IAED,eAAe,CAAC,WAAwB;QACpC,OAAO,IAAI,MAAM,CACb,IAAI,CAAC,MAAM,EACX,WAAW,EACX,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IAED,iBAAiB,CAAC,aAA4B;QAC1C,OAAO,IAAI,MAAM,CACb,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,aAAa,EACb,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IAED,mBAAmB,CAAC,eAAgC;QAChD,OAAO,IAAI,MAAM,CACb,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,eAAe,EACf,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IAED,gBAAgB,CAAC,YAA0B;QACvC,OAAO,IAAI,MAAM,CACb,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,EACpB,YAAY,EACZ,IAAI,CAAC,cAAc,CACtB,CAAC;IACN,CAAC;IAED,kBAAkB,CAAC,cAA8B;QAC7C,OAAO,IAAI,MAAM,CACb,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,YAAY,EACjB,cAAc,CACjB,CAAC;IACN,CAAC;IAED,MAAM;QACF,MAAM,UAAU,GAAe;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAC5B,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;YACtC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;YAC1C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YAC9C,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;SAC/C,CAAC;QACF,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContextLength as NapiContextLength } from "../napi/uzu.mjs";
|
|
2
|
-
import { ToNapi } from "./napi.mjs";
|
|
3
|
-
export declare class ContextLength implements ToNapi<NapiContextLength> {
|
|
4
|
-
private readonly napiContextLength;
|
|
5
|
-
private constructor();
|
|
6
|
-
static default(): ContextLength;
|
|
7
|
-
static maximal(): ContextLength;
|
|
8
|
-
static custom(length: number): ContextLength;
|
|
9
|
-
toNapi(): NapiContextLength;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=contextLength.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextLength.d.mts","sourceRoot":"","sources":["../src/bridging/contextLength.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE;OACtC,EAAE,MAAM,EAAE;AAEjB,qBAAa,aAAc,YAAW,MAAM,CAAC,iBAAiB,CAAC;IAC3D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IAEtD,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,aAAa;IAK/B,MAAM,CAAC,OAAO,IAAI,aAAa;IAK/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAK5C,MAAM,IAAI,iBAAiB;CAG9B"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContextLength as NapiContextLength } from "../napi/uzu.js";
|
|
2
|
-
import { ToNapi } from "./napi.js";
|
|
3
|
-
export declare class ContextLength implements ToNapi<NapiContextLength> {
|
|
4
|
-
private readonly napiContextLength;
|
|
5
|
-
private constructor();
|
|
6
|
-
static default(): ContextLength;
|
|
7
|
-
static maximal(): ContextLength;
|
|
8
|
-
static custom(length: number): ContextLength;
|
|
9
|
-
toNapi(): NapiContextLength;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=contextLength.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextLength.d.ts","sourceRoot":"","sources":["../src/bridging/contextLength.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE;OACtC,EAAE,MAAM,EAAE;AAEjB,qBAAa,aAAc,YAAW,MAAM,CAAC,iBAAiB,CAAC;IAC3D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IAEtD,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,aAAa;IAK/B,MAAM,CAAC,OAAO,IAAI,aAAa;IAK/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAK5C,MAAM,IAAI,iBAAiB;CAG9B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextLength = void 0;
|
|
4
|
-
class ContextLength {
|
|
5
|
-
constructor(napiContextLength) {
|
|
6
|
-
this.napiContextLength = napiContextLength;
|
|
7
|
-
}
|
|
8
|
-
static default() {
|
|
9
|
-
const napiContextLength = { type: 'Default' };
|
|
10
|
-
return new ContextLength(napiContextLength);
|
|
11
|
-
}
|
|
12
|
-
static maximal() {
|
|
13
|
-
const napiContextLength = { type: 'Maximal' };
|
|
14
|
-
return new ContextLength(napiContextLength);
|
|
15
|
-
}
|
|
16
|
-
static custom(length) {
|
|
17
|
-
const napiContextLength = { type: 'Custom', length };
|
|
18
|
-
return new ContextLength(napiContextLength);
|
|
19
|
-
}
|
|
20
|
-
toNapi() {
|
|
21
|
-
return this.napiContextLength;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.ContextLength = ContextLength;
|
|
25
|
-
//# sourceMappingURL=contextLength.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextLength.js","sourceRoot":"","sources":["../src/bridging/contextLength.ts"],"names":[],"mappings":";;;AAGA,MAAa,aAAa;IAGtB,YAAoB,iBAAoC;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc;QACxB,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QACxE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;CACJ;AAzBD,sCAyBC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class ContextLength {
|
|
2
|
-
constructor(napiContextLength) {
|
|
3
|
-
this.napiContextLength = napiContextLength;
|
|
4
|
-
}
|
|
5
|
-
static default() {
|
|
6
|
-
const napiContextLength = { type: 'Default' };
|
|
7
|
-
return new ContextLength(napiContextLength);
|
|
8
|
-
}
|
|
9
|
-
static maximal() {
|
|
10
|
-
const napiContextLength = { type: 'Maximal' };
|
|
11
|
-
return new ContextLength(napiContextLength);
|
|
12
|
-
}
|
|
13
|
-
static custom(length) {
|
|
14
|
-
const napiContextLength = { type: 'Custom', length };
|
|
15
|
-
return new ContextLength(napiContextLength);
|
|
16
|
-
}
|
|
17
|
-
toNapi() {
|
|
18
|
-
return this.napiContextLength;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=contextLength.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextLength.mjs","sourceRoot":"","sources":["../src/bridging/contextLength.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,aAAa;IAGtB,YAAoB,iBAAoC;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc;QACxB,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QACxE,OAAO,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;CACJ"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ContextMode as NapiContextMode } from "../napi/uzu.mjs";
|
|
2
|
-
import { Input } from "./input.mjs";
|
|
3
|
-
import { ToNapi } from "./napi.mjs";
|
|
4
|
-
export declare class ContextMode implements ToNapi<NapiContextMode> {
|
|
5
|
-
private readonly napiContextMode;
|
|
6
|
-
private constructor();
|
|
7
|
-
static none(): ContextMode;
|
|
8
|
-
static static(input: Input): ContextMode;
|
|
9
|
-
static dynamic(): ContextMode;
|
|
10
|
-
toNapi(): NapiContextMode;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=contextMode.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextMode.d.mts","sourceRoot":"","sources":["../src/bridging/contextMode.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAsB;OACtD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;AAEjB,qBAAa,WAAY,YAAW,MAAM,CAAC,eAAe,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAElD,OAAO;IAIP,MAAM,CAAC,IAAI,IAAI,WAAW;IAK1B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW;IAMxC,MAAM,CAAC,OAAO,IAAI,WAAW;IAK7B,MAAM,IAAI,eAAe;CAG5B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ContextMode as NapiContextMode } from "../napi/uzu.js";
|
|
2
|
-
import { Input } from "./input.js";
|
|
3
|
-
import { ToNapi } from "./napi.js";
|
|
4
|
-
export declare class ContextMode implements ToNapi<NapiContextMode> {
|
|
5
|
-
private readonly napiContextMode;
|
|
6
|
-
private constructor();
|
|
7
|
-
static none(): ContextMode;
|
|
8
|
-
static static(input: Input): ContextMode;
|
|
9
|
-
static dynamic(): ContextMode;
|
|
10
|
-
toNapi(): NapiContextMode;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=contextMode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextMode.d.ts","sourceRoot":"","sources":["../src/bridging/contextMode.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAsB;OACtD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;AAEjB,qBAAa,WAAY,YAAW,MAAM,CAAC,eAAe,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAElD,OAAO;IAIP,MAAM,CAAC,IAAI,IAAI,WAAW;IAK1B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW;IAMxC,MAAM,CAAC,OAAO,IAAI,WAAW;IAK7B,MAAM,IAAI,eAAe;CAG5B"}
|
package/bridging/contextMode.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextMode = void 0;
|
|
4
|
-
class ContextMode {
|
|
5
|
-
constructor(napiContextMode) {
|
|
6
|
-
this.napiContextMode = napiContextMode;
|
|
7
|
-
}
|
|
8
|
-
static none() {
|
|
9
|
-
const napiContextMode = { type: 'None' };
|
|
10
|
-
return new ContextMode(napiContextMode);
|
|
11
|
-
}
|
|
12
|
-
static static(input) {
|
|
13
|
-
let napiInput = input.toNapi();
|
|
14
|
-
let napiContextMode = { type: 'Static', input: napiInput };
|
|
15
|
-
return new ContextMode(napiContextMode);
|
|
16
|
-
}
|
|
17
|
-
static dynamic() {
|
|
18
|
-
const napiContextMode = { type: 'Dynamic' };
|
|
19
|
-
return new ContextMode(napiContextMode);
|
|
20
|
-
}
|
|
21
|
-
toNapi() {
|
|
22
|
-
return this.napiContextMode;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ContextMode = ContextMode;
|
|
26
|
-
//# sourceMappingURL=contextMode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextMode.js","sourceRoot":"","sources":["../src/bridging/contextMode.ts"],"names":[],"mappings":";;;AAIA,MAAa,WAAW;IAGpB,YAAoB,eAAgC;QAChD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,IAAI;QACP,MAAM,eAAe,GAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC1D,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,KAAY;QACtB,IAAI,SAAS,GAAc,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1C,IAAI,eAAe,GAAoB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC5E,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,eAAe,GAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7D,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;CACJ;AA1BD,kCA0BC"}
|
package/bridging/contextMode.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class ContextMode {
|
|
2
|
-
constructor(napiContextMode) {
|
|
3
|
-
this.napiContextMode = napiContextMode;
|
|
4
|
-
}
|
|
5
|
-
static none() {
|
|
6
|
-
const napiContextMode = { type: 'None' };
|
|
7
|
-
return new ContextMode(napiContextMode);
|
|
8
|
-
}
|
|
9
|
-
static static(input) {
|
|
10
|
-
let napiInput = input.toNapi();
|
|
11
|
-
let napiContextMode = { type: 'Static', input: napiInput };
|
|
12
|
-
return new ContextMode(napiContextMode);
|
|
13
|
-
}
|
|
14
|
-
static dynamic() {
|
|
15
|
-
const napiContextMode = { type: 'Dynamic' };
|
|
16
|
-
return new ContextMode(napiContextMode);
|
|
17
|
-
}
|
|
18
|
-
toNapi() {
|
|
19
|
-
return this.napiContextMode;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=contextMode.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextMode.mjs","sourceRoot":"","sources":["../src/bridging/contextMode.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAW;IAGpB,YAAoB,eAAgC;QAChD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,IAAI;QACP,MAAM,eAAe,GAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC1D,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,KAAY;QACtB,IAAI,SAAS,GAAc,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1C,IAAI,eAAe,GAAoB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC5E,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,eAAe,GAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7D,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;CACJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModelDownloadHandle as NapiModelDownloadHandle } from "../napi/uzu.mjs";
|
|
2
|
-
import { DownloadProgressUpdate } from "./downloadProgressUpdate.mjs";
|
|
3
|
-
import { DownloadState } from "./downloadState.mjs";
|
|
4
|
-
export declare class DownloadHandle {
|
|
5
|
-
private readonly napiDownloadHandle;
|
|
6
|
-
constructor(napiDownloadHandle: NapiModelDownloadHandle);
|
|
7
|
-
identifier(): string;
|
|
8
|
-
state(): Promise<DownloadState>;
|
|
9
|
-
download(): Promise<void>;
|
|
10
|
-
pause(): Promise<void>;
|
|
11
|
-
delete(): Promise<void>;
|
|
12
|
-
progressUpdate(): AsyncIterable<DownloadProgressUpdate>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=downloadHandle.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadHandle.d.mts","sourceRoot":"","sources":["../src/bridging/downloadHandle.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;OAClD,EAAE,sBAAsB,EAAE;OAC1B,EAAE,aAAa,EAAE;AAExB,qBAAa,cAAc;IACvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;gBAEjD,kBAAkB,EAAE,uBAAuB;IAIvD,UAAU,IAAI,MAAM;IAId,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IAK/B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,cAAc,IAAI,aAAa,CAAC,sBAAsB,CAAC;CAQ1D"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModelDownloadHandle as NapiModelDownloadHandle } from "../napi/uzu.js";
|
|
2
|
-
import { DownloadProgressUpdate } from "./downloadProgressUpdate.js";
|
|
3
|
-
import { DownloadState } from "./downloadState.js";
|
|
4
|
-
export declare class DownloadHandle {
|
|
5
|
-
private readonly napiDownloadHandle;
|
|
6
|
-
constructor(napiDownloadHandle: NapiModelDownloadHandle);
|
|
7
|
-
identifier(): string;
|
|
8
|
-
state(): Promise<DownloadState>;
|
|
9
|
-
download(): Promise<void>;
|
|
10
|
-
pause(): Promise<void>;
|
|
11
|
-
delete(): Promise<void>;
|
|
12
|
-
progressUpdate(): AsyncIterable<DownloadProgressUpdate>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=downloadHandle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadHandle.d.ts","sourceRoot":"","sources":["../src/bridging/downloadHandle.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;OAClD,EAAE,sBAAsB,EAAE;OAC1B,EAAE,aAAa,EAAE;AAExB,qBAAa,cAAc;IACvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;gBAEjD,kBAAkB,EAAE,uBAAuB;IAIvD,UAAU,IAAI,MAAM;IAId,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IAK/B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,cAAc,IAAI,aAAa,CAAC,sBAAsB,CAAC;CAQ1D"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DownloadHandle = void 0;
|
|
4
|
-
const downloadProgressUpdate_1 = require("./downloadProgressUpdate.js");
|
|
5
|
-
const downloadState_1 = require("./downloadState.js");
|
|
6
|
-
class DownloadHandle {
|
|
7
|
-
constructor(napiDownloadHandle) {
|
|
8
|
-
this.napiDownloadHandle = napiDownloadHandle;
|
|
9
|
-
}
|
|
10
|
-
identifier() {
|
|
11
|
-
return this.napiDownloadHandle.identifier();
|
|
12
|
-
}
|
|
13
|
-
async state() {
|
|
14
|
-
const napiDownloadState = await this.napiDownloadHandle.state();
|
|
15
|
-
return downloadState_1.DownloadState.fromNapi(napiDownloadState);
|
|
16
|
-
}
|
|
17
|
-
async download() {
|
|
18
|
-
await this.napiDownloadHandle.download();
|
|
19
|
-
}
|
|
20
|
-
async pause() {
|
|
21
|
-
await this.napiDownloadHandle.pause();
|
|
22
|
-
}
|
|
23
|
-
async delete() {
|
|
24
|
-
await this.napiDownloadHandle.delete();
|
|
25
|
-
}
|
|
26
|
-
progressUpdate() {
|
|
27
|
-
const source = this.napiDownloadHandle.progress();
|
|
28
|
-
return (async function* () {
|
|
29
|
-
for await (const update of source) {
|
|
30
|
-
yield downloadProgressUpdate_1.DownloadProgressUpdate.fromNapi(update);
|
|
31
|
-
}
|
|
32
|
-
})();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.DownloadHandle = DownloadHandle;
|
|
36
|
-
//# sourceMappingURL=downloadHandle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadHandle.js","sourceRoot":"","sources":["../src/bridging/downloadHandle.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAClE,sDAAgD;AAEhD,MAAa,cAAc;IAGvB,YAAY,kBAA2C;QACnD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAChE,OAAO,6BAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,MAAM;QACR,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;IAED,cAAc;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;QAClD,OAAO,CAAC,KAAK,SAAS,CAAC;YACnB,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;gBAChC,MAAM,+CAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClD,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;CACJ;AApCD,wCAoCC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { DownloadProgressUpdate } from "./downloadProgressUpdate.mjs";
|
|
2
|
-
import { DownloadState } from "./downloadState.mjs";
|
|
3
|
-
export class DownloadHandle {
|
|
4
|
-
constructor(napiDownloadHandle) {
|
|
5
|
-
this.napiDownloadHandle = napiDownloadHandle;
|
|
6
|
-
}
|
|
7
|
-
identifier() {
|
|
8
|
-
return this.napiDownloadHandle.identifier();
|
|
9
|
-
}
|
|
10
|
-
async state() {
|
|
11
|
-
const napiDownloadState = await this.napiDownloadHandle.state();
|
|
12
|
-
return DownloadState.fromNapi(napiDownloadState);
|
|
13
|
-
}
|
|
14
|
-
async download() {
|
|
15
|
-
await this.napiDownloadHandle.download();
|
|
16
|
-
}
|
|
17
|
-
async pause() {
|
|
18
|
-
await this.napiDownloadHandle.pause();
|
|
19
|
-
}
|
|
20
|
-
async delete() {
|
|
21
|
-
await this.napiDownloadHandle.delete();
|
|
22
|
-
}
|
|
23
|
-
progressUpdate() {
|
|
24
|
-
const source = this.napiDownloadHandle.progress();
|
|
25
|
-
return (async function* () {
|
|
26
|
-
for await (const update of source) {
|
|
27
|
-
yield DownloadProgressUpdate.fromNapi(update);
|
|
28
|
-
}
|
|
29
|
-
})();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=downloadHandle.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadHandle.mjs","sourceRoot":"","sources":["../src/bridging/downloadHandle.ts"],"names":[],"mappings":"OACO,EAAE,sBAAsB,EAAE;OAC1B,EAAE,aAAa,EAAE;AAExB,MAAM,OAAO,cAAc;IAGvB,YAAY,kBAA2C;QACnD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAChE,OAAO,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,MAAM;QACR,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;IAED,cAAc;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;QAClD,OAAO,CAAC,KAAK,SAAS,CAAC;YACnB,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;gBAChC,MAAM,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClD,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ProgressUpdate as NapiProgressUpdate } from "../napi/uzu.mjs";
|
|
2
|
-
export declare class DownloadProgressUpdate {
|
|
3
|
-
readonly completedBytes: number;
|
|
4
|
-
readonly totalBytes: number | null;
|
|
5
|
-
readonly progress: number;
|
|
6
|
-
private constructor();
|
|
7
|
-
static fromNapi(napiDownloadProgress: NapiProgressUpdate): DownloadProgressUpdate;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=downloadProgressUpdate.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadProgressUpdate.d.mts","sourceRoot":"","sources":["../src/bridging/downloadProgressUpdate.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;AAE/C,qBAAa,sBAAsB;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,OAAO;IAMP,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,kBAAkB,GAAG,sBAAsB;CAOpF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ProgressUpdate as NapiProgressUpdate } from "../napi/uzu.js";
|
|
2
|
-
export declare class DownloadProgressUpdate {
|
|
3
|
-
readonly completedBytes: number;
|
|
4
|
-
readonly totalBytes: number | null;
|
|
5
|
-
readonly progress: number;
|
|
6
|
-
private constructor();
|
|
7
|
-
static fromNapi(napiDownloadProgress: NapiProgressUpdate): DownloadProgressUpdate;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=downloadProgressUpdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadProgressUpdate.d.ts","sourceRoot":"","sources":["../src/bridging/downloadProgressUpdate.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;AAE/C,qBAAa,sBAAsB;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,OAAO;IAMP,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,kBAAkB,GAAG,sBAAsB;CAOpF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DownloadProgressUpdate = void 0;
|
|
4
|
-
class DownloadProgressUpdate {
|
|
5
|
-
constructor(completedBytes, totalBytes, progress) {
|
|
6
|
-
this.completedBytes = completedBytes;
|
|
7
|
-
this.totalBytes = totalBytes;
|
|
8
|
-
this.progress = progress;
|
|
9
|
-
}
|
|
10
|
-
static fromNapi(napiDownloadProgress) {
|
|
11
|
-
return new DownloadProgressUpdate(napiDownloadProgress.completedBytes, napiDownloadProgress.totalBytes ?? null, napiDownloadProgress.progress);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.DownloadProgressUpdate = DownloadProgressUpdate;
|
|
15
|
-
//# sourceMappingURL=downloadProgressUpdate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadProgressUpdate.js","sourceRoot":"","sources":["../src/bridging/downloadProgressUpdate.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IAK/B,YAAoB,cAAsB,EAAE,UAAyB,EAAE,QAAgB;QACnF,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,oBAAwC;QACpD,OAAO,IAAI,sBAAsB,CAC7B,oBAAoB,CAAC,cAAc,EACnC,oBAAoB,CAAC,UAAU,IAAI,IAAI,EACvC,oBAAoB,CAAC,QAAQ,CAChC,CAAC;IACN,CAAC;CACJ;AAlBD,wDAkBC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export class DownloadProgressUpdate {
|
|
2
|
-
constructor(completedBytes, totalBytes, progress) {
|
|
3
|
-
this.completedBytes = completedBytes;
|
|
4
|
-
this.totalBytes = totalBytes;
|
|
5
|
-
this.progress = progress;
|
|
6
|
-
}
|
|
7
|
-
static fromNapi(napiDownloadProgress) {
|
|
8
|
-
return new DownloadProgressUpdate(napiDownloadProgress.completedBytes, napiDownloadProgress.totalBytes ?? null, napiDownloadProgress.progress);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=downloadProgressUpdate.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadProgressUpdate.mjs","sourceRoot":"","sources":["../src/bridging/downloadProgressUpdate.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,sBAAsB;IAK/B,YAAoB,cAAsB,EAAE,UAAyB,EAAE,QAAgB;QACnF,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,oBAAwC;QACpD,OAAO,IAAI,sBAAsB,CAC7B,oBAAoB,CAAC,cAAc,EACnC,oBAAoB,CAAC,UAAU,IAAI,IAAI,EACvC,oBAAoB,CAAC,QAAQ,CAChC,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ModelDownloadState as NapiModelDownloadState } from "../napi/uzu.mjs";
|
|
2
|
-
export declare enum DownloadPhase {
|
|
3
|
-
NotDownloaded = "NotDownloaded",
|
|
4
|
-
Downloading = "Downloading",
|
|
5
|
-
Paused = "Paused",
|
|
6
|
-
Downloaded = "Downloaded",
|
|
7
|
-
Locked = "Locked",
|
|
8
|
-
Error = "Error"
|
|
9
|
-
}
|
|
10
|
-
export declare class DownloadState {
|
|
11
|
-
readonly totalKbytes: number;
|
|
12
|
-
readonly downloadedKbytes: number;
|
|
13
|
-
readonly phase: DownloadPhase;
|
|
14
|
-
readonly error: string | null;
|
|
15
|
-
private constructor();
|
|
16
|
-
private static napiPhaseToDownloadPhase;
|
|
17
|
-
static fromNapi(napiDownloadState: NapiModelDownloadState): DownloadState;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=downloadState.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadState.d.mts","sourceRoot":"","sources":["../src/bridging/downloadState.ts"],"names":[],"mappings":"OACO,EAEH,kBAAkB,IAAI,sBAAsB,EAC/C;AAED,oBAAY,aAAa;IACrB,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED,qBAAa,aAAa;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,OAAO;IAYP,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAmBvC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,sBAAsB,GAAG,aAAa;CAS5E"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ModelDownloadState as NapiModelDownloadState } from "../napi/uzu.js";
|
|
2
|
-
export declare enum DownloadPhase {
|
|
3
|
-
NotDownloaded = "NotDownloaded",
|
|
4
|
-
Downloading = "Downloading",
|
|
5
|
-
Paused = "Paused",
|
|
6
|
-
Downloaded = "Downloaded",
|
|
7
|
-
Locked = "Locked",
|
|
8
|
-
Error = "Error"
|
|
9
|
-
}
|
|
10
|
-
export declare class DownloadState {
|
|
11
|
-
readonly totalKbytes: number;
|
|
12
|
-
readonly downloadedKbytes: number;
|
|
13
|
-
readonly phase: DownloadPhase;
|
|
14
|
-
readonly error: string | null;
|
|
15
|
-
private constructor();
|
|
16
|
-
private static napiPhaseToDownloadPhase;
|
|
17
|
-
static fromNapi(napiDownloadState: NapiModelDownloadState): DownloadState;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=downloadState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadState.d.ts","sourceRoot":"","sources":["../src/bridging/downloadState.ts"],"names":[],"mappings":"OACO,EAEH,kBAAkB,IAAI,sBAAsB,EAC/C;AAED,oBAAY,aAAa;IACrB,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED,qBAAa,aAAa;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,OAAO;IAYP,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAmBvC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,sBAAsB,GAAG,aAAa;CAS5E"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DownloadState = exports.DownloadPhase = void 0;
|
|
4
|
-
const error_1 = require("../error.js");
|
|
5
|
-
var DownloadPhase;
|
|
6
|
-
(function (DownloadPhase) {
|
|
7
|
-
DownloadPhase["NotDownloaded"] = "NotDownloaded";
|
|
8
|
-
DownloadPhase["Downloading"] = "Downloading";
|
|
9
|
-
DownloadPhase["Paused"] = "Paused";
|
|
10
|
-
DownloadPhase["Downloaded"] = "Downloaded";
|
|
11
|
-
DownloadPhase["Locked"] = "Locked";
|
|
12
|
-
DownloadPhase["Error"] = "Error";
|
|
13
|
-
})(DownloadPhase || (exports.DownloadPhase = DownloadPhase = {}));
|
|
14
|
-
class DownloadState {
|
|
15
|
-
constructor(totalKbytes, downloadedKbytes, phase, error) {
|
|
16
|
-
this.totalKbytes = totalKbytes;
|
|
17
|
-
this.downloadedKbytes = downloadedKbytes;
|
|
18
|
-
this.phase = phase;
|
|
19
|
-
this.error = error;
|
|
20
|
-
}
|
|
21
|
-
static napiPhaseToDownloadPhase(napiPhase) {
|
|
22
|
-
switch (napiPhase) {
|
|
23
|
-
case 0:
|
|
24
|
-
return DownloadPhase.NotDownloaded;
|
|
25
|
-
case 1:
|
|
26
|
-
return DownloadPhase.Downloading;
|
|
27
|
-
case 2:
|
|
28
|
-
return DownloadPhase.Paused;
|
|
29
|
-
case 3:
|
|
30
|
-
return DownloadPhase.Downloaded;
|
|
31
|
-
case 4:
|
|
32
|
-
return DownloadPhase.Locked;
|
|
33
|
-
case 5:
|
|
34
|
-
return DownloadPhase.Error;
|
|
35
|
-
default:
|
|
36
|
-
throw new error_1.EngineError(error_1.EngineErrorCode.UnexpectedDownloadPhase);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
static fromNapi(napiDownloadState) {
|
|
40
|
-
const phase = DownloadState.napiPhaseToDownloadPhase(napiDownloadState.phase);
|
|
41
|
-
return new DownloadState(napiDownloadState.totalKbytes, napiDownloadState.downloadedKbytes, phase, napiDownloadState.error ?? null);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.DownloadState = DownloadState;
|
|
45
|
-
//# sourceMappingURL=downloadState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadState.js","sourceRoot":"","sources":["../src/bridging/downloadState.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AAMxD,IAAY,aAOX;AAPD,WAAY,aAAa;IACrB,gDAA+B,CAAA;IAC/B,4CAA2B,CAAA;IAC3B,kCAAiB,CAAA;IACjB,0CAAyB,CAAA;IACzB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;AACnB,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB;AAED,MAAa,aAAa;IAMtB,YACI,WAAmB,EACnB,gBAAwB,EACxB,KAAoB,EACpB,KAAoB;QAEpB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEO,MAAM,CAAC,wBAAwB,CAAC,SAAiC;QACrE,QAAQ,SAAS,EAAE,CAAC;YAChB,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,aAAa,CAAC;YACvC,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,WAAW,CAAC;YACrC,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,MAAM,CAAC;YAChC,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,UAAU,CAAC;YACpC,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,MAAM,CAAC;YAChC,KAAK,CAAC;gBACF,OAAO,aAAa,CAAC,KAAK,CAAC;YAC/B;gBACI,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,uBAAuB,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,iBAAyC;QACrD,MAAM,KAAK,GAAG,aAAa,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC9E,OAAO,IAAI,aAAa,CACpB,iBAAiB,CAAC,WAAW,EAC7B,iBAAiB,CAAC,gBAAgB,EAClC,KAAK,EACL,iBAAiB,CAAC,KAAK,IAAI,IAAI,CAClC,CAAC;IACN,CAAC;CACJ;AA9CD,sCA8CC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { EngineError, EngineErrorCode } from "../error.mjs";
|
|
2
|
-
export var DownloadPhase;
|
|
3
|
-
(function (DownloadPhase) {
|
|
4
|
-
DownloadPhase["NotDownloaded"] = "NotDownloaded";
|
|
5
|
-
DownloadPhase["Downloading"] = "Downloading";
|
|
6
|
-
DownloadPhase["Paused"] = "Paused";
|
|
7
|
-
DownloadPhase["Downloaded"] = "Downloaded";
|
|
8
|
-
DownloadPhase["Locked"] = "Locked";
|
|
9
|
-
DownloadPhase["Error"] = "Error";
|
|
10
|
-
})(DownloadPhase || (DownloadPhase = {}));
|
|
11
|
-
export class DownloadState {
|
|
12
|
-
constructor(totalKbytes, downloadedKbytes, phase, error) {
|
|
13
|
-
this.totalKbytes = totalKbytes;
|
|
14
|
-
this.downloadedKbytes = downloadedKbytes;
|
|
15
|
-
this.phase = phase;
|
|
16
|
-
this.error = error;
|
|
17
|
-
}
|
|
18
|
-
static napiPhaseToDownloadPhase(napiPhase) {
|
|
19
|
-
switch (napiPhase) {
|
|
20
|
-
case 0:
|
|
21
|
-
return DownloadPhase.NotDownloaded;
|
|
22
|
-
case 1:
|
|
23
|
-
return DownloadPhase.Downloading;
|
|
24
|
-
case 2:
|
|
25
|
-
return DownloadPhase.Paused;
|
|
26
|
-
case 3:
|
|
27
|
-
return DownloadPhase.Downloaded;
|
|
28
|
-
case 4:
|
|
29
|
-
return DownloadPhase.Locked;
|
|
30
|
-
case 5:
|
|
31
|
-
return DownloadPhase.Error;
|
|
32
|
-
default:
|
|
33
|
-
throw new EngineError(EngineErrorCode.UnexpectedDownloadPhase);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
static fromNapi(napiDownloadState) {
|
|
37
|
-
const phase = DownloadState.napiPhaseToDownloadPhase(napiDownloadState.phase);
|
|
38
|
-
return new DownloadState(napiDownloadState.totalKbytes, napiDownloadState.downloadedKbytes, phase, napiDownloadState.error ?? null);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=downloadState.mjs.map
|