@trymirai/uzu 0.1.21 → 0.1.23
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 +21 -0
- package/README.md +103 -136
- package/bridging/classificationFeature.d.mts +9 -0
- package/bridging/classificationFeature.d.mts.map +1 -0
- package/bridging/classificationFeature.d.ts +9 -0
- package/bridging/classificationFeature.d.ts.map +1 -0
- package/bridging/classificationFeature.js +18 -0
- package/bridging/classificationFeature.js.map +1 -0
- package/bridging/classificationFeature.mjs +14 -0
- package/bridging/classificationFeature.mjs.map +1 -0
- package/bridging/config.d.mts +20 -0
- package/bridging/config.d.mts.map +1 -0
- package/bridging/config.d.ts +20 -0
- package/bridging/config.d.ts.map +1 -0
- package/bridging/config.js +41 -0
- package/bridging/config.js.map +1 -0
- package/bridging/config.mjs +37 -0
- package/bridging/config.mjs.map +1 -0
- package/bridging/contextLength.d.mts +11 -0
- package/bridging/contextLength.d.mts.map +1 -0
- package/bridging/contextLength.d.ts +11 -0
- package/bridging/contextLength.d.ts.map +1 -0
- package/bridging/contextLength.js +25 -0
- package/bridging/contextLength.js.map +1 -0
- package/bridging/contextLength.mjs +21 -0
- package/bridging/contextLength.mjs.map +1 -0
- package/bridging/downloadHandle.d.mts +14 -0
- package/bridging/downloadHandle.d.mts.map +1 -0
- package/bridging/downloadHandle.d.ts +14 -0
- package/bridging/downloadHandle.d.ts.map +1 -0
- package/bridging/downloadHandle.js +36 -0
- package/bridging/downloadHandle.js.map +1 -0
- package/bridging/downloadHandle.mjs +32 -0
- package/bridging/downloadHandle.mjs.map +1 -0
- package/bridging/downloadProgressUpdate.d.mts +9 -0
- package/bridging/downloadProgressUpdate.d.mts.map +1 -0
- package/bridging/downloadProgressUpdate.d.ts +9 -0
- package/bridging/downloadProgressUpdate.d.ts.map +1 -0
- package/bridging/downloadProgressUpdate.js +15 -0
- package/bridging/downloadProgressUpdate.js.map +1 -0
- package/bridging/downloadProgressUpdate.mjs +11 -0
- package/bridging/downloadProgressUpdate.mjs.map +1 -0
- package/bridging/downloadState.d.mts +18 -0
- package/bridging/downloadState.d.mts.map +1 -0
- package/bridging/downloadState.d.ts +18 -0
- package/bridging/downloadState.d.ts.map +1 -0
- package/bridging/downloadState.js +42 -0
- package/bridging/downloadState.js.map +1 -0
- package/bridging/downloadState.mjs +38 -0
- package/bridging/downloadState.mjs.map +1 -0
- package/bridging/engine.d.mts +17 -0
- package/bridging/engine.d.mts.map +1 -0
- package/bridging/engine.d.ts +17 -0
- package/bridging/engine.d.ts.map +1 -0
- package/bridging/engine.js +84 -0
- package/bridging/engine.js.map +1 -0
- package/bridging/engine.mjs +80 -0
- package/bridging/engine.mjs.map +1 -0
- package/bridging/finishReason.d.mts +7 -0
- package/bridging/finishReason.d.mts.map +1 -0
- package/bridging/finishReason.d.ts +7 -0
- package/bridging/finishReason.d.ts.map +1 -0
- package/bridging/finishReason.js +11 -0
- package/bridging/finishReason.js.map +1 -0
- package/bridging/finishReason.mjs +8 -0
- package/bridging/finishReason.mjs.map +1 -0
- package/bridging/input.d.mts +11 -0
- package/bridging/input.d.mts.map +1 -0
- package/bridging/input.d.ts +11 -0
- package/bridging/input.d.ts.map +1 -0
- package/bridging/input.js +25 -0
- package/bridging/input.js.map +1 -0
- package/bridging/input.mjs +21 -0
- package/bridging/input.mjs.map +1 -0
- package/bridging/licenseStatus.d.mts +14 -0
- package/bridging/licenseStatus.d.mts.map +1 -0
- package/bridging/licenseStatus.d.ts +14 -0
- package/bridging/licenseStatus.d.ts.map +1 -0
- package/bridging/licenseStatus.js +42 -0
- package/bridging/licenseStatus.js.map +1 -0
- package/bridging/licenseStatus.mjs +38 -0
- package/bridging/licenseStatus.mjs.map +1 -0
- package/bridging/message.d.mts +15 -0
- package/bridging/message.d.mts.map +1 -0
- package/bridging/message.d.ts +15 -0
- package/bridging/message.d.ts.map +1 -0
- package/bridging/message.js +43 -0
- package/bridging/message.js.map +1 -0
- package/bridging/message.mjs +39 -0
- package/bridging/message.mjs.map +1 -0
- package/bridging/model.d.mts +18 -0
- package/bridging/model.d.mts.map +1 -0
- package/bridging/model.d.ts +18 -0
- package/bridging/model.d.ts.map +1 -0
- package/bridging/model.js +28 -0
- package/bridging/model.js.map +1 -0
- package/bridging/model.mjs +24 -0
- package/bridging/model.mjs.map +1 -0
- package/bridging/napi.d.mts +4 -0
- package/bridging/napi.d.mts.map +1 -0
- package/bridging/napi.d.ts +4 -0
- package/bridging/napi.d.ts.map +1 -0
- package/bridging/napi.js +3 -0
- package/bridging/napi.js.map +1 -0
- package/bridging/napi.mjs +2 -0
- package/bridging/napi.mjs.map +1 -0
- package/bridging/output.d.mts +13 -0
- package/bridging/output.d.mts.map +1 -0
- package/bridging/output.d.ts +13 -0
- package/bridging/output.d.ts.map +1 -0
- package/bridging/output.js +36 -0
- package/bridging/output.js.map +1 -0
- package/bridging/output.mjs +32 -0
- package/bridging/output.mjs.map +1 -0
- package/bridging/parsedText.d.mts +8 -0
- package/bridging/parsedText.d.mts.map +1 -0
- package/bridging/parsedText.d.ts +8 -0
- package/bridging/parsedText.d.ts.map +1 -0
- package/bridging/parsedText.js +16 -0
- package/bridging/parsedText.js.map +1 -0
- package/bridging/parsedText.mjs +12 -0
- package/bridging/parsedText.mjs.map +1 -0
- package/bridging/prefillStepSize.d.mts +11 -0
- package/bridging/prefillStepSize.d.mts.map +1 -0
- package/bridging/prefillStepSize.d.ts +11 -0
- package/bridging/prefillStepSize.d.ts.map +1 -0
- package/bridging/prefillStepSize.js +28 -0
- package/bridging/prefillStepSize.js.map +1 -0
- package/bridging/prefillStepSize.mjs +24 -0
- package/bridging/prefillStepSize.mjs.map +1 -0
- package/bridging/preset.d.mts +12 -0
- package/bridging/preset.d.mts.map +1 -0
- package/bridging/preset.d.ts +12 -0
- package/bridging/preset.d.ts.map +1 -0
- package/bridging/preset.js +29 -0
- package/bridging/preset.js.map +1 -0
- package/bridging/preset.mjs +25 -0
- package/bridging/preset.mjs.map +1 -0
- package/bridging/role.d.mts +6 -0
- package/bridging/role.d.mts.map +1 -0
- package/bridging/role.d.ts +6 -0
- package/bridging/role.d.ts.map +1 -0
- package/bridging/role.js +10 -0
- package/bridging/role.js.map +1 -0
- package/bridging/role.mjs +7 -0
- package/bridging/role.mjs.map +1 -0
- package/bridging/runConfig.d.mts +15 -0
- package/bridging/runConfig.d.mts.map +1 -0
- package/bridging/runConfig.d.ts +15 -0
- package/bridging/runConfig.d.ts.map +1 -0
- package/bridging/runConfig.js +34 -0
- package/bridging/runConfig.js.map +1 -0
- package/bridging/runConfig.mjs +30 -0
- package/bridging/runConfig.mjs.map +1 -0
- package/bridging/runStats.d.mts +8 -0
- package/bridging/runStats.d.mts.map +1 -0
- package/bridging/runStats.d.ts +8 -0
- package/bridging/runStats.d.ts.map +1 -0
- package/bridging/runStats.js +16 -0
- package/bridging/runStats.js.map +1 -0
- package/bridging/runStats.mjs +12 -0
- package/bridging/runStats.mjs.map +1 -0
- package/bridging/samplingMethod.d.mts +11 -0
- package/bridging/samplingMethod.d.mts.map +1 -0
- package/bridging/samplingMethod.d.ts +11 -0
- package/bridging/samplingMethod.d.ts.map +1 -0
- package/bridging/samplingMethod.js +28 -0
- package/bridging/samplingMethod.js.map +1 -0
- package/bridging/samplingMethod.mjs +24 -0
- package/bridging/samplingMethod.mjs.map +1 -0
- package/bridging/samplingPolicy.d.mts +11 -0
- package/bridging/samplingPolicy.d.mts.map +1 -0
- package/bridging/samplingPolicy.d.ts +11 -0
- package/bridging/samplingPolicy.d.ts.map +1 -0
- package/bridging/samplingPolicy.js +25 -0
- package/bridging/samplingPolicy.js.map +1 -0
- package/bridging/samplingPolicy.mjs +21 -0
- package/bridging/samplingPolicy.mjs.map +1 -0
- package/bridging/samplingSeed.d.mts +10 -0
- package/bridging/samplingSeed.d.mts.map +1 -0
- package/bridging/samplingSeed.d.ts +10 -0
- package/bridging/samplingSeed.d.ts.map +1 -0
- package/bridging/samplingSeed.js +21 -0
- package/bridging/samplingSeed.js.map +1 -0
- package/bridging/samplingSeed.mjs +17 -0
- package/bridging/samplingSeed.mjs.map +1 -0
- package/bridging/session.d.mts +10 -0
- package/bridging/session.d.mts.map +1 -0
- package/bridging/session.d.ts +10 -0
- package/bridging/session.d.ts.map +1 -0
- package/bridging/session.js +19 -0
- package/bridging/session.js.map +1 -0
- package/bridging/session.mjs +15 -0
- package/bridging/session.mjs.map +1 -0
- package/bridging/stats.d.mts +11 -0
- package/bridging/stats.d.mts.map +1 -0
- package/bridging/stats.d.ts +11 -0
- package/bridging/stats.d.ts.map +1 -0
- package/bridging/stats.js +20 -0
- package/bridging/stats.js.map +1 -0
- package/bridging/stats.mjs +16 -0
- package/bridging/stats.mjs.map +1 -0
- package/bridging/stepStats.d.mts +13 -0
- package/bridging/stepStats.d.mts.map +1 -0
- package/bridging/stepStats.d.ts +13 -0
- package/bridging/stepStats.d.ts.map +1 -0
- package/bridging/stepStats.js +25 -0
- package/bridging/stepStats.js.map +1 -0
- package/bridging/stepStats.mjs +21 -0
- package/bridging/stepStats.mjs.map +1 -0
- package/bridging/text.d.mts +9 -0
- package/bridging/text.d.mts.map +1 -0
- package/bridging/text.d.ts +9 -0
- package/bridging/text.d.ts.map +1 -0
- package/bridging/text.js +17 -0
- package/bridging/text.js.map +1 -0
- package/bridging/text.mjs +13 -0
- package/bridging/text.mjs.map +1 -0
- package/bridging/totalStats.d.mts +9 -0
- package/bridging/totalStats.d.mts.map +1 -0
- package/bridging/totalStats.d.ts +9 -0
- package/bridging/totalStats.d.ts.map +1 -0
- package/bridging/totalStats.js +18 -0
- package/bridging/totalStats.js.map +1 -0
- package/bridging/totalStats.mjs +14 -0
- package/bridging/totalStats.mjs.map +1 -0
- package/error.d.mts +16 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +16 -0
- package/error.d.ts.map +1 -0
- package/error.js +42 -0
- package/error.js.map +1 -0
- package/error.mjs +37 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +33 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +33 -0
- package/index.d.ts.map +1 -0
- package/index.js +74 -0
- package/index.js.map +1 -0
- package/index.mjs +33 -0
- package/index.mjs.map +1 -0
- package/interactors/downloadInteractor.d.mts +16 -0
- package/interactors/downloadInteractor.d.mts.map +1 -0
- package/interactors/downloadInteractor.d.ts +16 -0
- package/interactors/downloadInteractor.d.ts.map +1 -0
- package/interactors/downloadInteractor.js +38 -0
- package/interactors/downloadInteractor.js.map +1 -0
- package/interactors/downloadInteractor.mjs +34 -0
- package/interactors/downloadInteractor.mjs.map +1 -0
- package/interactors/engineInteractor.d.mts +17 -0
- package/interactors/engineInteractor.d.mts.map +1 -0
- package/interactors/engineInteractor.d.ts +17 -0
- package/interactors/engineInteractor.d.ts.map +1 -0
- package/interactors/engineInteractor.js +34 -0
- package/interactors/engineInteractor.js.map +1 -0
- package/interactors/engineInteractor.mjs +30 -0
- package/interactors/engineInteractor.mjs.map +1 -0
- package/interactors/interactor.d.mts +6 -0
- package/interactors/interactor.d.mts.map +1 -0
- package/interactors/interactor.d.ts +6 -0
- package/interactors/interactor.d.ts.map +1 -0
- package/interactors/interactor.js +3 -0
- package/interactors/interactor.js.map +1 -0
- package/interactors/interactor.mjs +2 -0
- package/interactors/interactor.mjs.map +1 -0
- package/interactors/modelInteractor.d.mts +30 -0
- package/interactors/modelInteractor.d.mts.map +1 -0
- package/interactors/modelInteractor.d.ts +30 -0
- package/interactors/modelInteractor.d.ts.map +1 -0
- package/interactors/modelInteractor.js +85 -0
- package/interactors/modelInteractor.js.map +1 -0
- package/interactors/modelInteractor.mjs +81 -0
- package/interactors/modelInteractor.mjs.map +1 -0
- package/interactors/modelsInteractor.d.mts +12 -0
- package/interactors/modelsInteractor.d.mts.map +1 -0
- package/interactors/modelsInteractor.d.ts +12 -0
- package/interactors/modelsInteractor.d.ts.map +1 -0
- package/interactors/modelsInteractor.js +25 -0
- package/interactors/modelsInteractor.js.map +1 -0
- package/interactors/modelsInteractor.mjs +21 -0
- package/interactors/modelsInteractor.mjs.map +1 -0
- package/interactors/sessionInteractor.d.mts +24 -0
- package/interactors/sessionInteractor.d.mts.map +1 -0
- package/interactors/sessionInteractor.d.ts +24 -0
- package/interactors/sessionInteractor.d.ts.map +1 -0
- package/interactors/sessionInteractor.js +50 -0
- package/interactors/sessionInteractor.js.map +1 -0
- package/interactors/sessionInteractor.mjs +46 -0
- package/interactors/sessionInteractor.mjs.map +1 -0
- package/internal/tslib.js +2 -0
- package/internal/tslib.mjs +1 -0
- package/{uzu.d.ts → napi/uzu.d.ts} +38 -37
- package/napi/uzu.js +95 -0
- package/napi/uzu.mjs +61 -0
- package/{uzu.node → napi/uzu.node} +0 -0
- package/package.json +96 -35
- package/src/bridging/classificationFeature.ts +20 -0
- package/src/bridging/config.ts +60 -0
- package/src/bridging/contextLength.ts +29 -0
- package/src/bridging/downloadHandle.ts +41 -0
- package/src/bridging/downloadProgressUpdate.ts +21 -0
- package/src/bridging/downloadState.ts +59 -0
- package/src/bridging/engine.ts +97 -0
- package/src/bridging/finishReason.ts +6 -0
- package/src/bridging/input.ts +29 -0
- package/src/bridging/licenseStatus.ts +39 -0
- package/src/bridging/message.ts +50 -0
- package/src/bridging/model.ts +32 -0
- package/src/bridging/napi.ts +3 -0
- package/src/bridging/output.ts +40 -0
- package/src/bridging/parsedText.ts +17 -0
- package/src/bridging/prefillStepSize.ts +32 -0
- package/src/bridging/preset.ts +34 -0
- package/src/bridging/role.ts +5 -0
- package/src/bridging/runConfig.ts +41 -0
- package/src/bridging/runStats.ts +17 -0
- package/src/bridging/samplingMethod.ts +32 -0
- package/src/bridging/samplingPolicy.ts +29 -0
- package/src/bridging/samplingSeed.ts +24 -0
- package/src/bridging/session.ts +24 -0
- package/src/bridging/stats.ts +22 -0
- package/src/bridging/stepStats.ts +37 -0
- package/src/bridging/text.ts +18 -0
- package/src/bridging/totalStats.ts +20 -0
- package/src/error.ts +38 -0
- package/src/index.ts +32 -0
- package/src/interactors/downloadInteractor.ts +47 -0
- package/src/interactors/engineInteractor.ts +48 -0
- package/src/interactors/interactor.ts +7 -0
- package/src/interactors/modelInteractor.ts +113 -0
- package/src/interactors/modelsInteractor.ts +29 -0
- package/src/interactors/sessionInteractor.ts +70 -0
- package/src/napi/uzu.d.ts +230 -0
- package/src/napi/uzu.js +95 -0
- package/src/napi/uzu.mjs +61 -0
- package/src/napi/uzu.node +0 -0
- package/src/tsconfig.json +11 -0
- package/src/utilities/env.ts +9 -0
- package/src/version.ts +1 -0
- package/utilities/env.d.mts +2 -0
- package/utilities/env.d.mts.map +1 -0
- package/utilities/env.d.ts +2 -0
- package/utilities/env.d.ts.map +1 -0
- package/utilities/env.js +14 -0
- package/utilities/env.js.map +1 -0
- package/utilities/env.mjs +10 -0
- package/utilities/env.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/README.orig.md +0 -213
- package/README.src.md +0 -124
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsedText.js","sourceRoot":"","sources":["../src/bridging/parsedText.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;IAInB,YAAoB,cAA6B,EAAE,QAAuB;QACtE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAA0B;QACtC,MAAM,cAAc,GAAG,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC;QACzD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,IAAI,CAAC;QAC7C,OAAO,IAAI,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;CACJ;AAdD,gCAcC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class ParsedText {
|
|
2
|
+
constructor(chainOfThought, response) {
|
|
3
|
+
this.chainOfThought = chainOfThought;
|
|
4
|
+
this.response = response;
|
|
5
|
+
}
|
|
6
|
+
static fromNapi(napiEntity) {
|
|
7
|
+
const chainOfThought = napiEntity.chainOfThought ?? null;
|
|
8
|
+
const response = napiEntity.response ?? null;
|
|
9
|
+
return new ParsedText(chainOfThought, response);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=parsedText.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsedText.mjs","sourceRoot":"","sources":["../src/bridging/parsedText.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,UAAU;IAInB,YAAoB,cAA6B,EAAE,QAAuB;QACtE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAA0B;QACtC,MAAM,cAAc,GAAG,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC;QACzD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,IAAI,CAAC;QAC7C,OAAO,IAAI,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PrefillStepSize as NapiPrefillStepSize } from "../napi/uzu.mjs";
|
|
2
|
+
import { ToNapi } from "./napi.mjs";
|
|
3
|
+
export declare class PrefillStepSize implements ToNapi<NapiPrefillStepSize> {
|
|
4
|
+
private readonly napiPrefillStepSize;
|
|
5
|
+
private constructor();
|
|
6
|
+
static default(): PrefillStepSize;
|
|
7
|
+
static maximal(): PrefillStepSize;
|
|
8
|
+
static custom(length: number): PrefillStepSize;
|
|
9
|
+
toNapi(): NapiPrefillStepSize;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=prefillStepSize.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillStepSize.d.mts","sourceRoot":"","sources":["../src/bridging/prefillStepSize.ts"],"names":[],"mappings":"OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE;OAC1C,EAAE,MAAM,EAAE;AAEjB,qBAAa,eAAgB,YAAW,MAAM,CAAC,mBAAmB,CAAC;IAC/D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsB;IAE1D,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,eAAe;IAKjC,MAAM,CAAC,OAAO,IAAI,eAAe;IAKjC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;IAQ9C,MAAM,IAAI,mBAAmB;CAGhC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PrefillStepSize as NapiPrefillStepSize } from "../napi/uzu.js";
|
|
2
|
+
import { ToNapi } from "./napi.js";
|
|
3
|
+
export declare class PrefillStepSize implements ToNapi<NapiPrefillStepSize> {
|
|
4
|
+
private readonly napiPrefillStepSize;
|
|
5
|
+
private constructor();
|
|
6
|
+
static default(): PrefillStepSize;
|
|
7
|
+
static maximal(): PrefillStepSize;
|
|
8
|
+
static custom(length: number): PrefillStepSize;
|
|
9
|
+
toNapi(): NapiPrefillStepSize;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=prefillStepSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillStepSize.d.ts","sourceRoot":"","sources":["../src/bridging/prefillStepSize.ts"],"names":[],"mappings":"OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE;OAC1C,EAAE,MAAM,EAAE;AAEjB,qBAAa,eAAgB,YAAW,MAAM,CAAC,mBAAmB,CAAC;IAC/D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsB;IAE1D,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,eAAe;IAKjC,MAAM,CAAC,OAAO,IAAI,eAAe;IAKjC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;IAQ9C,MAAM,IAAI,mBAAmB;CAGhC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrefillStepSize = void 0;
|
|
4
|
+
class PrefillStepSize {
|
|
5
|
+
constructor(napiPrefillStepSize) {
|
|
6
|
+
this.napiPrefillStepSize = napiPrefillStepSize;
|
|
7
|
+
}
|
|
8
|
+
static default() {
|
|
9
|
+
const napiPrefillStepSize = { type: 'Default' };
|
|
10
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
11
|
+
}
|
|
12
|
+
static maximal() {
|
|
13
|
+
const napiPrefillStepSize = { type: 'Maximal' };
|
|
14
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
15
|
+
}
|
|
16
|
+
static custom(length) {
|
|
17
|
+
const napiPrefillStepSize = {
|
|
18
|
+
type: 'Custom',
|
|
19
|
+
length,
|
|
20
|
+
};
|
|
21
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
22
|
+
}
|
|
23
|
+
toNapi() {
|
|
24
|
+
return this.napiPrefillStepSize;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.PrefillStepSize = PrefillStepSize;
|
|
28
|
+
//# sourceMappingURL=prefillStepSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillStepSize.js","sourceRoot":"","sources":["../src/bridging/prefillStepSize.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAGxB,YAAoB,mBAAwC;QACxD,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,mBAAmB,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,mBAAmB,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc;QACxB,MAAM,mBAAmB,GAAwB;YAC7C,IAAI,EAAE,QAAQ;YACd,MAAM;SACT,CAAC;QACF,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;CACJ;AA5BD,0CA4BC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class PrefillStepSize {
|
|
2
|
+
constructor(napiPrefillStepSize) {
|
|
3
|
+
this.napiPrefillStepSize = napiPrefillStepSize;
|
|
4
|
+
}
|
|
5
|
+
static default() {
|
|
6
|
+
const napiPrefillStepSize = { type: 'Default' };
|
|
7
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
8
|
+
}
|
|
9
|
+
static maximal() {
|
|
10
|
+
const napiPrefillStepSize = { type: 'Maximal' };
|
|
11
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
12
|
+
}
|
|
13
|
+
static custom(length) {
|
|
14
|
+
const napiPrefillStepSize = {
|
|
15
|
+
type: 'Custom',
|
|
16
|
+
length,
|
|
17
|
+
};
|
|
18
|
+
return new PrefillStepSize(napiPrefillStepSize);
|
|
19
|
+
}
|
|
20
|
+
toNapi() {
|
|
21
|
+
return this.napiPrefillStepSize;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=prefillStepSize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillStepSize.mjs","sourceRoot":"","sources":["../src/bridging/prefillStepSize.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,eAAe;IAGxB,YAAoB,mBAAwC;QACxD,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,mBAAmB,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,mBAAmB,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc;QACxB,MAAM,mBAAmB,GAAwB;YAC7C,IAAI,EAAE,QAAQ;YACd,MAAM;SACT,CAAC;QACF,OAAO,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;CACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Preset as NapiPreset } from "../napi/uzu.mjs";
|
|
2
|
+
import { ClassificationFeature } from "./classificationFeature.mjs";
|
|
3
|
+
import { ToNapi } from "./napi.mjs";
|
|
4
|
+
export declare class Preset implements ToNapi<NapiPreset> {
|
|
5
|
+
private readonly napiPreset;
|
|
6
|
+
private constructor();
|
|
7
|
+
static general(): Preset;
|
|
8
|
+
static classification(feature: ClassificationFeature): Preset;
|
|
9
|
+
static summarization(): Preset;
|
|
10
|
+
toNapi(): NapiPreset;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=preset.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.mts","sourceRoot":"","sources":["../src/bridging/preset.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,IAAI,UAAU,EAAE;OACxB,EAAE,qBAAqB,EAAE;OACzB,EAAE,MAAM,EAAE;AAEjB,qBAAa,MAAO,YAAW,MAAM,CAAC,UAAU,CAAC;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,MAAM;IAKxB,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAS7D,MAAM,CAAC,aAAa,IAAI,MAAM;IAK9B,MAAM,IAAI,UAAU;CAGvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Preset as NapiPreset } from "../napi/uzu.js";
|
|
2
|
+
import { ClassificationFeature } from "./classificationFeature.js";
|
|
3
|
+
import { ToNapi } from "./napi.js";
|
|
4
|
+
export declare class Preset implements ToNapi<NapiPreset> {
|
|
5
|
+
private readonly napiPreset;
|
|
6
|
+
private constructor();
|
|
7
|
+
static general(): Preset;
|
|
8
|
+
static classification(feature: ClassificationFeature): Preset;
|
|
9
|
+
static summarization(): Preset;
|
|
10
|
+
toNapi(): NapiPreset;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/bridging/preset.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,IAAI,UAAU,EAAE;OACxB,EAAE,qBAAqB,EAAE;OACzB,EAAE,MAAM,EAAE;AAEjB,qBAAa,MAAO,YAAW,MAAM,CAAC,UAAU,CAAC;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,MAAM;IAKxB,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAS7D,MAAM,CAAC,aAAa,IAAI,MAAM;IAK9B,MAAM,IAAI,UAAU;CAGvB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Preset = void 0;
|
|
4
|
+
class Preset {
|
|
5
|
+
constructor(napiPreset) {
|
|
6
|
+
this.napiPreset = napiPreset;
|
|
7
|
+
}
|
|
8
|
+
static general() {
|
|
9
|
+
const napiPreset = { type: 'General' };
|
|
10
|
+
return new Preset(napiPreset);
|
|
11
|
+
}
|
|
12
|
+
static classification(feature) {
|
|
13
|
+
const napiClassificationFeature = feature.toNapi();
|
|
14
|
+
const napiPreset = {
|
|
15
|
+
type: 'Classification',
|
|
16
|
+
feature: napiClassificationFeature,
|
|
17
|
+
};
|
|
18
|
+
return new Preset(napiPreset);
|
|
19
|
+
}
|
|
20
|
+
static summarization() {
|
|
21
|
+
const napiPreset = { type: 'Summarization' };
|
|
22
|
+
return new Preset(napiPreset);
|
|
23
|
+
}
|
|
24
|
+
toNapi() {
|
|
25
|
+
return this.napiPreset;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Preset = Preset;
|
|
29
|
+
//# sourceMappingURL=preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../src/bridging/preset.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IAGf,YAAoB,UAAsB;QACtC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnD,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,OAA8B;QAChD,MAAM,yBAAyB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACnD,MAAM,UAAU,GAAe;YAC3B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,yBAAyB;SACrC,CAAC;QACF,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,aAAa;QAChB,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QACzD,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;AA7BD,wBA6BC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class Preset {
|
|
2
|
+
constructor(napiPreset) {
|
|
3
|
+
this.napiPreset = napiPreset;
|
|
4
|
+
}
|
|
5
|
+
static general() {
|
|
6
|
+
const napiPreset = { type: 'General' };
|
|
7
|
+
return new Preset(napiPreset);
|
|
8
|
+
}
|
|
9
|
+
static classification(feature) {
|
|
10
|
+
const napiClassificationFeature = feature.toNapi();
|
|
11
|
+
const napiPreset = {
|
|
12
|
+
type: 'Classification',
|
|
13
|
+
feature: napiClassificationFeature,
|
|
14
|
+
};
|
|
15
|
+
return new Preset(napiPreset);
|
|
16
|
+
}
|
|
17
|
+
static summarization() {
|
|
18
|
+
const napiPreset = { type: 'Summarization' };
|
|
19
|
+
return new Preset(napiPreset);
|
|
20
|
+
}
|
|
21
|
+
toNapi() {
|
|
22
|
+
return this.napiPreset;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=preset.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.mjs","sourceRoot":"","sources":["../src/bridging/preset.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IAGf,YAAoB,UAAsB;QACtC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnD,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,OAA8B;QAChD,MAAM,yBAAyB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACnD,MAAM,UAAU,GAAe;YAC3B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,yBAAyB;SACrC,CAAC;QACF,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,aAAa;QAChB,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QACzD,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.d.mts","sourceRoot":"","sources":["../src/bridging/role.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACZ,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,SAAS,cAAc;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../src/bridging/role.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACZ,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,SAAS,cAAc;CAC1B"}
|
package/bridging/role.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Role = void 0;
|
|
4
|
+
var Role;
|
|
5
|
+
(function (Role) {
|
|
6
|
+
Role["System"] = "system";
|
|
7
|
+
Role["User"] = "user";
|
|
8
|
+
Role["Assistant"] = "assistant";
|
|
9
|
+
})(Role || (exports.Role = Role = {}));
|
|
10
|
+
//# sourceMappingURL=role.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.js","sourceRoot":"","sources":["../src/bridging/role.ts"],"names":[],"mappings":";;;AAAA,IAAY,IAIX;AAJD,WAAY,IAAI;IACZ,yBAAiB,CAAA;IACjB,qBAAa,CAAA;IACb,+BAAuB,CAAA;AAC3B,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.mjs","sourceRoot":"","sources":["../src/bridging/role.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACZ,yBAAiB,CAAA;IACjB,qBAAa,CAAA;IACb,+BAAuB,CAAA;AAC3B,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RunConfig as NapiRunConfig } from "../napi/uzu.mjs";
|
|
2
|
+
import { ToNapi } from "./napi.mjs";
|
|
3
|
+
import { SamplingPolicy } from "./samplingPolicy.mjs";
|
|
4
|
+
export declare class RunConfig implements ToNapi<NapiRunConfig> {
|
|
5
|
+
readonly tokensLimit: number;
|
|
6
|
+
readonly enableThinking: boolean;
|
|
7
|
+
readonly samplingPolicy: SamplingPolicy;
|
|
8
|
+
private constructor();
|
|
9
|
+
static default(): RunConfig;
|
|
10
|
+
withTokensLimit(tokensLimit: number): RunConfig;
|
|
11
|
+
withEnableThinking(enableThinking: boolean): RunConfig;
|
|
12
|
+
withSamplingPolicy(samplingPolicy: SamplingPolicy): RunConfig;
|
|
13
|
+
toNapi(): NapiRunConfig;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=runConfig.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runConfig.d.mts","sourceRoot":"","sources":["../src/bridging/runConfig.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,IAAI,aAAa,EAAE;OAC9B,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,SAAU,YAAW,MAAM,CAAC,aAAa,CAAC;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC,OAAO;IAMP,MAAM,CAAC,OAAO,IAAI,SAAS;IAI3B,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;IAI/C,kBAAkB,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS;IAItD,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,SAAS;IAI7D,MAAM,IAAI,aAAa;CAS1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RunConfig as NapiRunConfig } from "../napi/uzu.js";
|
|
2
|
+
import { ToNapi } from "./napi.js";
|
|
3
|
+
import { SamplingPolicy } from "./samplingPolicy.js";
|
|
4
|
+
export declare class RunConfig implements ToNapi<NapiRunConfig> {
|
|
5
|
+
readonly tokensLimit: number;
|
|
6
|
+
readonly enableThinking: boolean;
|
|
7
|
+
readonly samplingPolicy: SamplingPolicy;
|
|
8
|
+
private constructor();
|
|
9
|
+
static default(): RunConfig;
|
|
10
|
+
withTokensLimit(tokensLimit: number): RunConfig;
|
|
11
|
+
withEnableThinking(enableThinking: boolean): RunConfig;
|
|
12
|
+
withSamplingPolicy(samplingPolicy: SamplingPolicy): RunConfig;
|
|
13
|
+
toNapi(): NapiRunConfig;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=runConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runConfig.d.ts","sourceRoot":"","sources":["../src/bridging/runConfig.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,IAAI,aAAa,EAAE;OAC9B,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,SAAU,YAAW,MAAM,CAAC,aAAa,CAAC;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC,OAAO;IAMP,MAAM,CAAC,OAAO,IAAI,SAAS;IAI3B,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;IAI/C,kBAAkB,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS;IAItD,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,SAAS;IAI7D,MAAM,IAAI,aAAa;CAS1B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RunConfig = void 0;
|
|
4
|
+
const samplingPolicy_1 = require("./samplingPolicy.js");
|
|
5
|
+
class RunConfig {
|
|
6
|
+
constructor(tokensLimit, enableThinking, samplingPolicy) {
|
|
7
|
+
this.tokensLimit = tokensLimit;
|
|
8
|
+
this.enableThinking = enableThinking;
|
|
9
|
+
this.samplingPolicy = samplingPolicy;
|
|
10
|
+
}
|
|
11
|
+
static default() {
|
|
12
|
+
return new RunConfig(1024, true, samplingPolicy_1.SamplingPolicy.default());
|
|
13
|
+
}
|
|
14
|
+
withTokensLimit(tokensLimit) {
|
|
15
|
+
return new RunConfig(tokensLimit, this.enableThinking, this.samplingPolicy);
|
|
16
|
+
}
|
|
17
|
+
withEnableThinking(enableThinking) {
|
|
18
|
+
return new RunConfig(this.tokensLimit, enableThinking, this.samplingPolicy);
|
|
19
|
+
}
|
|
20
|
+
withSamplingPolicy(samplingPolicy) {
|
|
21
|
+
return new RunConfig(this.tokensLimit, this.enableThinking, samplingPolicy);
|
|
22
|
+
}
|
|
23
|
+
toNapi() {
|
|
24
|
+
const napiSamplingPolicy = this.samplingPolicy.toNapi();
|
|
25
|
+
const napiRunConfig = {
|
|
26
|
+
tokensLimit: this.tokensLimit,
|
|
27
|
+
enableThinking: this.enableThinking,
|
|
28
|
+
samplingPolicy: napiSamplingPolicy,
|
|
29
|
+
};
|
|
30
|
+
return napiRunConfig;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.RunConfig = RunConfig;
|
|
34
|
+
//# sourceMappingURL=runConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runConfig.js","sourceRoot":"","sources":["../src/bridging/runConfig.ts"],"names":[],"mappings":";;;AAEA,wDAAkD;AAElD,MAAa,SAAS;IAKlB,YAAoB,WAAmB,EAAE,cAAuB,EAAE,cAA8B;QAC5F,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,+BAAc,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,eAAe,CAAC,WAAmB;QAC/B,OAAO,IAAI,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,kBAAkB,CAAC,cAAuB;QACtC,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,kBAAkB,CAAC,cAA8B;QAC7C,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QACxD,MAAM,aAAa,GAAkB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,cAAc,EAAE,kBAAkB;SACrC,CAAC;QACF,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ;AApCD,8BAoCC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SamplingPolicy } from "./samplingPolicy.mjs";
|
|
2
|
+
export class RunConfig {
|
|
3
|
+
constructor(tokensLimit, enableThinking, samplingPolicy) {
|
|
4
|
+
this.tokensLimit = tokensLimit;
|
|
5
|
+
this.enableThinking = enableThinking;
|
|
6
|
+
this.samplingPolicy = samplingPolicy;
|
|
7
|
+
}
|
|
8
|
+
static default() {
|
|
9
|
+
return new RunConfig(1024, true, SamplingPolicy.default());
|
|
10
|
+
}
|
|
11
|
+
withTokensLimit(tokensLimit) {
|
|
12
|
+
return new RunConfig(tokensLimit, this.enableThinking, this.samplingPolicy);
|
|
13
|
+
}
|
|
14
|
+
withEnableThinking(enableThinking) {
|
|
15
|
+
return new RunConfig(this.tokensLimit, enableThinking, this.samplingPolicy);
|
|
16
|
+
}
|
|
17
|
+
withSamplingPolicy(samplingPolicy) {
|
|
18
|
+
return new RunConfig(this.tokensLimit, this.enableThinking, samplingPolicy);
|
|
19
|
+
}
|
|
20
|
+
toNapi() {
|
|
21
|
+
const napiSamplingPolicy = this.samplingPolicy.toNapi();
|
|
22
|
+
const napiRunConfig = {
|
|
23
|
+
tokensLimit: this.tokensLimit,
|
|
24
|
+
enableThinking: this.enableThinking,
|
|
25
|
+
samplingPolicy: napiSamplingPolicy,
|
|
26
|
+
};
|
|
27
|
+
return napiRunConfig;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=runConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runConfig.mjs","sourceRoot":"","sources":["../src/bridging/runConfig.ts"],"names":[],"mappings":"OAEO,EAAE,cAAc,EAAE;AAEzB,MAAM,OAAO,SAAS;IAKlB,YAAoB,WAAmB,EAAE,cAAuB,EAAE,cAA8B;QAC5F,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,eAAe,CAAC,WAAmB;QAC/B,OAAO,IAAI,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,kBAAkB,CAAC,cAAuB;QACtC,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,kBAAkB,CAAC,cAA8B;QAC7C,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;IAED,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QACxD,MAAM,aAAa,GAAkB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,cAAc,EAAE,kBAAkB;SACrC,CAAC;QACF,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RunStats as NapiRunStats } from "../napi/uzu.mjs";
|
|
2
|
+
export declare class RunStats {
|
|
3
|
+
readonly count: number;
|
|
4
|
+
readonly averageDuration: number;
|
|
5
|
+
private constructor();
|
|
6
|
+
static fromNapi(napiEntity: NapiRunStats): RunStats;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=runStats.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runStats.d.mts","sourceRoot":"","sources":["../src/bridging/runStats.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE;AAEnC,qBAAa,QAAQ;IACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ;CAKtD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RunStats as NapiRunStats } from "../napi/uzu.js";
|
|
2
|
+
export declare class RunStats {
|
|
3
|
+
readonly count: number;
|
|
4
|
+
readonly averageDuration: number;
|
|
5
|
+
private constructor();
|
|
6
|
+
static fromNapi(napiEntity: NapiRunStats): RunStats;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=runStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runStats.d.ts","sourceRoot":"","sources":["../src/bridging/runStats.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE;AAEnC,qBAAa,QAAQ;IACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ;CAKtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RunStats = void 0;
|
|
4
|
+
class RunStats {
|
|
5
|
+
constructor(count, averageDuration) {
|
|
6
|
+
this.count = count;
|
|
7
|
+
this.averageDuration = averageDuration;
|
|
8
|
+
}
|
|
9
|
+
static fromNapi(napiEntity) {
|
|
10
|
+
const count = Number(napiEntity.count);
|
|
11
|
+
const averageDuration = napiEntity.averageDuration;
|
|
12
|
+
return new RunStats(count, averageDuration);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.RunStats = RunStats;
|
|
16
|
+
//# sourceMappingURL=runStats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runStats.js","sourceRoot":"","sources":["../src/bridging/runStats.ts"],"names":[],"mappings":";;;AAEA,MAAa,QAAQ;IAIjB,YAAoB,KAAa,EAAE,eAAuB;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAwB;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QACnD,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAChD,CAAC;CACJ;AAdD,4BAcC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class RunStats {
|
|
2
|
+
constructor(count, averageDuration) {
|
|
3
|
+
this.count = count;
|
|
4
|
+
this.averageDuration = averageDuration;
|
|
5
|
+
}
|
|
6
|
+
static fromNapi(napiEntity) {
|
|
7
|
+
const count = Number(napiEntity.count);
|
|
8
|
+
const averageDuration = napiEntity.averageDuration;
|
|
9
|
+
return new RunStats(count, averageDuration);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=runStats.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runStats.mjs","sourceRoot":"","sources":["../src/bridging/runStats.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,QAAQ;IAIjB,YAAoB,KAAa,EAAE,eAAuB;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAwB;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QACnD,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAChD,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SamplingMethod as NapiSamplingMethod } from "../napi/uzu.mjs";
|
|
2
|
+
import { ToNapi } from "./napi.mjs";
|
|
3
|
+
export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
|
|
4
|
+
private readonly napiSamplingMethod;
|
|
5
|
+
private constructor();
|
|
6
|
+
static greedy(): SamplingMethod;
|
|
7
|
+
static temperature(temperature: number): SamplingMethod;
|
|
8
|
+
static topP(topP: number): SamplingMethod;
|
|
9
|
+
toNapi(): NapiSamplingMethod;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=samplingMethod.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingMethod.d.mts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc;IAQvD,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKzC,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SamplingMethod as NapiSamplingMethod } from "../napi/uzu.js";
|
|
2
|
+
import { ToNapi } from "./napi.js";
|
|
3
|
+
export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
|
|
4
|
+
private readonly napiSamplingMethod;
|
|
5
|
+
private constructor();
|
|
6
|
+
static greedy(): SamplingMethod;
|
|
7
|
+
static temperature(temperature: number): SamplingMethod;
|
|
8
|
+
static topP(topP: number): SamplingMethod;
|
|
9
|
+
toNapi(): NapiSamplingMethod;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=samplingMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingMethod.d.ts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc;IAQvD,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKzC,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SamplingMethod = void 0;
|
|
4
|
+
class SamplingMethod {
|
|
5
|
+
constructor(napiSamplingMethod) {
|
|
6
|
+
this.napiSamplingMethod = napiSamplingMethod;
|
|
7
|
+
}
|
|
8
|
+
static greedy() {
|
|
9
|
+
const napiSamplingMethod = { type: 'Greedy' };
|
|
10
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
11
|
+
}
|
|
12
|
+
static temperature(temperature) {
|
|
13
|
+
const napiSamplingMethod = {
|
|
14
|
+
type: 'Temperature',
|
|
15
|
+
temperature,
|
|
16
|
+
};
|
|
17
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
18
|
+
}
|
|
19
|
+
static topP(topP) {
|
|
20
|
+
const napiSamplingMethod = { type: 'TopP', topP };
|
|
21
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
22
|
+
}
|
|
23
|
+
toNapi() {
|
|
24
|
+
return this.napiSamplingMethod;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.SamplingMethod = SamplingMethod;
|
|
28
|
+
//# sourceMappingURL=samplingMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingMethod.js","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,WAAmB;QAClC,MAAM,kBAAkB,GAAuB;YAC3C,IAAI,EAAE,aAAa;YACnB,WAAW;SACd,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ;AA5BD,wCA4BC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class SamplingMethod {
|
|
2
|
+
constructor(napiSamplingMethod) {
|
|
3
|
+
this.napiSamplingMethod = napiSamplingMethod;
|
|
4
|
+
}
|
|
5
|
+
static greedy() {
|
|
6
|
+
const napiSamplingMethod = { type: 'Greedy' };
|
|
7
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
8
|
+
}
|
|
9
|
+
static temperature(temperature) {
|
|
10
|
+
const napiSamplingMethod = {
|
|
11
|
+
type: 'Temperature',
|
|
12
|
+
temperature,
|
|
13
|
+
};
|
|
14
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
15
|
+
}
|
|
16
|
+
static topP(topP) {
|
|
17
|
+
const napiSamplingMethod = { type: 'TopP', topP };
|
|
18
|
+
return new SamplingMethod(napiSamplingMethod);
|
|
19
|
+
}
|
|
20
|
+
toNapi() {
|
|
21
|
+
return this.napiSamplingMethod;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=samplingMethod.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingMethod.mjs","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,WAAmB;QAClC,MAAM,kBAAkB,GAAuB;YAC3C,IAAI,EAAE,aAAa;YACnB,WAAW;SACd,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SamplingPolicy as NapiSamplingPolicy } from "../napi/uzu.mjs";
|
|
2
|
+
import { ToNapi } from "./napi.mjs";
|
|
3
|
+
import { SamplingMethod } from "./samplingMethod.mjs";
|
|
4
|
+
export declare class SamplingPolicy implements ToNapi<NapiSamplingPolicy> {
|
|
5
|
+
private readonly napiSamplingPolicy;
|
|
6
|
+
private constructor();
|
|
7
|
+
static default(): SamplingPolicy;
|
|
8
|
+
static custom(method: SamplingMethod): SamplingPolicy;
|
|
9
|
+
toNapi(): NapiSamplingPolicy;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=samplingPolicy.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingPolicy.d.mts","sourceRoot":"","sources":["../src/bridging/samplingPolicy.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,cAAc;IAKhC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc;IASrD,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SamplingPolicy as NapiSamplingPolicy } from "../napi/uzu.js";
|
|
2
|
+
import { ToNapi } from "./napi.js";
|
|
3
|
+
import { SamplingMethod } from "./samplingMethod.js";
|
|
4
|
+
export declare class SamplingPolicy implements ToNapi<NapiSamplingPolicy> {
|
|
5
|
+
private readonly napiSamplingPolicy;
|
|
6
|
+
private constructor();
|
|
7
|
+
static default(): SamplingPolicy;
|
|
8
|
+
static custom(method: SamplingMethod): SamplingPolicy;
|
|
9
|
+
toNapi(): NapiSamplingPolicy;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=samplingPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingPolicy.d.ts","sourceRoot":"","sources":["../src/bridging/samplingPolicy.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAEzB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,OAAO,IAAI,cAAc;IAKhC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc;IASrD,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SamplingPolicy = void 0;
|
|
4
|
+
class SamplingPolicy {
|
|
5
|
+
constructor(napiSamplingPolicy) {
|
|
6
|
+
this.napiSamplingPolicy = napiSamplingPolicy;
|
|
7
|
+
}
|
|
8
|
+
static default() {
|
|
9
|
+
const napiSamplingPolicy = { type: 'Default' };
|
|
10
|
+
return new SamplingPolicy(napiSamplingPolicy);
|
|
11
|
+
}
|
|
12
|
+
static custom(method) {
|
|
13
|
+
const napiSamplingMethod = method.toNapi();
|
|
14
|
+
const napiSamplingPolicy = {
|
|
15
|
+
type: 'Custom',
|
|
16
|
+
value: napiSamplingMethod,
|
|
17
|
+
};
|
|
18
|
+
return new SamplingPolicy(napiSamplingPolicy);
|
|
19
|
+
}
|
|
20
|
+
toNapi() {
|
|
21
|
+
return this.napiSamplingPolicy;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.SamplingPolicy = SamplingPolicy;
|
|
25
|
+
//# sourceMappingURL=samplingPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplingPolicy.js","sourceRoot":"","sources":["../src/bridging/samplingPolicy.ts"],"names":[],"mappings":";;;AAIA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,OAAO;QACV,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAsB;QAChC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3C,MAAM,kBAAkB,GAAuB;YAC3C,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kBAAkB;SAC5B,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ;AAxBD,wCAwBC"}
|