@trymirai/uzu 0.2.20 → 0.3.1

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.
Files changed (166) hide show
  1. package/README.md +6 -4
  2. package/bridging/classificationLabel.d.mts +12 -0
  3. package/bridging/classificationLabel.d.mts.map +1 -0
  4. package/bridging/classificationLabel.d.ts +12 -0
  5. package/bridging/classificationLabel.d.ts.map +1 -0
  6. package/bridging/classificationLabel.js +26 -0
  7. package/bridging/classificationLabel.js.map +1 -0
  8. package/bridging/classificationLabel.mjs +22 -0
  9. package/bridging/classificationLabel.mjs.map +1 -0
  10. package/bridging/classificationOutput.d.mts +10 -0
  11. package/bridging/classificationOutput.d.mts.map +1 -0
  12. package/bridging/classificationOutput.d.ts +10 -0
  13. package/bridging/classificationOutput.d.ts.map +1 -0
  14. package/bridging/classificationOutput.js +16 -0
  15. package/bridging/classificationOutput.js.map +1 -0
  16. package/bridging/classificationOutput.mjs +12 -0
  17. package/bridging/classificationOutput.mjs.map +1 -0
  18. package/bridging/classificationSession.d.mts +9 -0
  19. package/bridging/classificationSession.d.mts.map +1 -0
  20. package/bridging/classificationSession.d.ts +9 -0
  21. package/bridging/classificationSession.d.ts.map +1 -0
  22. package/bridging/classificationSession.js +16 -0
  23. package/bridging/classificationSession.js.map +1 -0
  24. package/bridging/classificationSession.mjs +12 -0
  25. package/bridging/classificationSession.mjs.map +1 -0
  26. package/bridging/classificationStats.d.mts +14 -0
  27. package/bridging/classificationStats.d.mts.map +1 -0
  28. package/bridging/classificationStats.d.ts +14 -0
  29. package/bridging/classificationStats.d.ts.map +1 -0
  30. package/bridging/classificationStats.js +20 -0
  31. package/bridging/classificationStats.js.map +1 -0
  32. package/bridging/classificationStats.mjs +16 -0
  33. package/bridging/classificationStats.mjs.map +1 -0
  34. package/bridging/engine.d.mts +14 -6
  35. package/bridging/engine.d.mts.map +1 -1
  36. package/bridging/engine.d.ts +14 -6
  37. package/bridging/engine.d.ts.map +1 -1
  38. package/bridging/engine.js +53 -23
  39. package/bridging/engine.js.map +1 -1
  40. package/bridging/engine.mjs +53 -23
  41. package/bridging/engine.mjs.map +1 -1
  42. package/bridging/model.d.mts +19 -0
  43. package/bridging/model.d.mts.map +1 -0
  44. package/bridging/model.d.ts +19 -0
  45. package/bridging/model.d.ts.map +1 -0
  46. package/bridging/model.js +39 -0
  47. package/bridging/model.js.map +1 -0
  48. package/bridging/model.mjs +35 -0
  49. package/bridging/model.mjs.map +1 -0
  50. package/bridging/modelKind.d.mts +8 -0
  51. package/bridging/modelKind.d.mts.map +1 -0
  52. package/bridging/modelKind.d.ts +8 -0
  53. package/bridging/modelKind.d.ts.map +1 -0
  54. package/bridging/modelKind.js +30 -0
  55. package/bridging/modelKind.js.map +1 -0
  56. package/bridging/modelKind.mjs +25 -0
  57. package/bridging/modelKind.mjs.map +1 -0
  58. package/bridging/modelType.d.mts +3 -2
  59. package/bridging/modelType.d.mts.map +1 -1
  60. package/bridging/modelType.d.ts +3 -2
  61. package/bridging/modelType.d.ts.map +1 -1
  62. package/bridging/modelType.js +11 -6
  63. package/bridging/modelType.js.map +1 -1
  64. package/bridging/modelType.mjs +11 -6
  65. package/bridging/modelType.mjs.map +1 -1
  66. package/bridging/samplingMethod.d.mts +2 -1
  67. package/bridging/samplingMethod.d.mts.map +1 -1
  68. package/bridging/samplingMethod.d.ts +2 -1
  69. package/bridging/samplingMethod.d.ts.map +1 -1
  70. package/bridging/samplingMethod.js +3 -1
  71. package/bridging/samplingMethod.js.map +1 -1
  72. package/bridging/samplingMethod.mjs +3 -1
  73. package/bridging/samplingMethod.mjs.map +1 -1
  74. package/bridging/samplingProcessingOrder.d.mts +8 -0
  75. package/bridging/samplingProcessingOrder.d.mts.map +1 -0
  76. package/bridging/samplingProcessingOrder.d.ts +8 -0
  77. package/bridging/samplingProcessingOrder.d.ts.map +1 -0
  78. package/bridging/samplingProcessingOrder.js +30 -0
  79. package/bridging/samplingProcessingOrder.js.map +1 -0
  80. package/bridging/samplingProcessingOrder.mjs +25 -0
  81. package/bridging/samplingProcessingOrder.mjs.map +1 -0
  82. package/bridging/textToSpeechSession.d.mts +8 -0
  83. package/bridging/textToSpeechSession.d.mts.map +1 -0
  84. package/bridging/textToSpeechSession.d.ts +8 -0
  85. package/bridging/textToSpeechSession.d.ts.map +1 -0
  86. package/bridging/textToSpeechSession.js +14 -0
  87. package/bridging/textToSpeechSession.js.map +1 -0
  88. package/bridging/textToSpeechSession.mjs +10 -0
  89. package/bridging/textToSpeechSession.mjs.map +1 -0
  90. package/error.d.mts +2 -0
  91. package/error.d.mts.map +1 -1
  92. package/error.d.ts +2 -0
  93. package/error.d.ts.map +1 -1
  94. package/error.js +4 -0
  95. package/error.js.map +1 -1
  96. package/error.mjs +4 -0
  97. package/error.mjs.map +1 -1
  98. package/index.d.mts +8 -1
  99. package/index.d.mts.map +1 -1
  100. package/index.d.ts +8 -1
  101. package/index.d.ts.map +1 -1
  102. package/index.js +17 -3
  103. package/index.js.map +1 -1
  104. package/index.mjs +8 -1
  105. package/index.mjs.map +1 -1
  106. package/interactors/chatModelInteractor.d.mts +5 -5
  107. package/interactors/chatModelInteractor.d.mts.map +1 -1
  108. package/interactors/chatModelInteractor.d.ts +5 -5
  109. package/interactors/chatModelInteractor.d.ts.map +1 -1
  110. package/interactors/chatModelInteractor.js +2 -2
  111. package/interactors/chatModelInteractor.js.map +1 -1
  112. package/interactors/chatModelInteractor.mjs +2 -2
  113. package/interactors/chatModelInteractor.mjs.map +1 -1
  114. package/interactors/chatModelsInteractor.d.mts +5 -5
  115. package/interactors/chatModelsInteractor.d.mts.map +1 -1
  116. package/interactors/chatModelsInteractor.d.ts +5 -5
  117. package/interactors/chatModelsInteractor.d.ts.map +1 -1
  118. package/interactors/chatModelsInteractor.js.map +1 -1
  119. package/interactors/chatModelsInteractor.mjs.map +1 -1
  120. package/interactors/engineInteractor.d.mts +4 -4
  121. package/interactors/engineInteractor.d.ts +4 -4
  122. package/interactors/engineInteractor.js +5 -5
  123. package/interactors/engineInteractor.mjs +5 -5
  124. package/napi/uzu.d.ts +67 -15
  125. package/napi/uzu.js +16 -2
  126. package/napi/uzu.mjs +8 -1
  127. package/napi/uzu.node +0 -0
  128. package/package.json +1 -1
  129. package/src/bridging/classificationLabel.ts +43 -0
  130. package/src/bridging/classificationOutput.ts +22 -0
  131. package/src/bridging/classificationSession.ts +17 -0
  132. package/src/bridging/classificationStats.ts +45 -0
  133. package/src/bridging/engine.ts +62 -26
  134. package/src/bridging/model.ts +68 -0
  135. package/src/bridging/modelKind.ts +27 -0
  136. package/src/bridging/modelType.ts +11 -6
  137. package/src/bridging/samplingMethod.ts +6 -0
  138. package/src/bridging/samplingProcessingOrder.ts +31 -0
  139. package/src/bridging/textToSpeechSession.ts +15 -0
  140. package/src/error.ts +4 -0
  141. package/src/index.ts +8 -1
  142. package/src/interactors/chatModelInteractor.ts +7 -7
  143. package/src/interactors/chatModelsInteractor.ts +5 -5
  144. package/src/interactors/engineInteractor.ts +7 -7
  145. package/src/napi/uzu.d.ts +67 -15
  146. package/src/napi/uzu.js +16 -2
  147. package/src/napi/uzu.mjs +8 -1
  148. package/src/napi/uzu.node +0 -0
  149. package/src/version.ts +1 -1
  150. package/version.d.mts +1 -1
  151. package/version.d.mts.map +1 -1
  152. package/version.d.ts +1 -1
  153. package/version.d.ts.map +1 -1
  154. package/version.js +1 -1
  155. package/version.js.map +1 -1
  156. package/version.mjs +1 -1
  157. package/version.mjs.map +1 -1
  158. package/bridging/chatModel.d.mts +0 -15
  159. package/bridging/chatModel.d.mts.map +0 -1
  160. package/bridging/chatModel.d.ts +0 -15
  161. package/bridging/chatModel.d.ts.map +0 -1
  162. package/bridging/chatModel.js +0 -33
  163. package/bridging/chatModel.js.map +0 -1
  164. package/bridging/chatModel.mjs +0 -29
  165. package/bridging/chatModel.mjs.map +0 -1
  166. package/src/bridging/chatModel.ts +0 -54
package/README.md CHANGED
@@ -24,7 +24,7 @@ Add the `uzu` dependency to your project's `package.json`:
24
24
 
25
25
  ```json
26
26
  "dependencies": {
27
- "@trymirai/uzu": "0.2.20"
27
+ "@trymirai/uzu": "0.3.1"
28
28
  }
29
29
  ```
30
30
 
@@ -51,7 +51,9 @@ pnpm run tsn examples/chatStaticContext.ts
51
51
  pnpm run tsn examples/summarization.ts
52
52
  pnpm run tsn examples/classification.ts
53
53
  pnpm run tsn examples/cloud.ts
54
- pnpm run tsn examples/structutedOutput.ts
54
+ pnpm run tsn examples/structuredOutput.ts
55
+ pnpm run tsn examples/classifier.ts
56
+ pnpm run tsn examples/textToSpeech.ts
55
57
  ```
56
58
 
57
59
  ### Chat
@@ -140,7 +142,7 @@ async function main() {
140
142
  const engine = await Engine.load('API_KEY');
141
143
 
142
144
  const model = await engine.chatModel('Qwen/Qwen3-0.6B');
143
- await engine.downloadChatModel(model, (update) => {
145
+ await engine.downloadModel(model, (update) => {
144
146
  console.log('Progress:', update.progress);
145
147
  });
146
148
 
@@ -190,7 +192,7 @@ async function main() {
190
192
  const engine = await Engine.load('API_KEY');
191
193
 
192
194
  const model = await engine.chatModel('Qwen/Qwen3-0.6B');
193
- await engine.downloadChatModel(model, (update) => {
195
+ await engine.downloadModel(model, (update) => {
194
196
  console.log('Progress:', update.progress);
195
197
  });
196
198
 
@@ -0,0 +1,12 @@
1
+ import { ClassificationLabel as NapiClassificationLabel } from "../napi/uzu.mjs";
2
+ export declare class ClassificationLabel {
3
+ readonly index: number;
4
+ readonly label: string;
5
+ readonly title: string;
6
+ readonly description: string;
7
+ readonly recommendedThreshold: number;
8
+ constructor(index: number, label: string, title: string, description: string, recommendedThreshold: number);
9
+ static fromNapi(napiEntity: NapiClassificationLabel): ClassificationLabel;
10
+ toNapi(): NapiClassificationLabel;
11
+ }
12
+ //# sourceMappingURL=classificationLabel.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationLabel.d.mts","sourceRoot":"","sources":["../src/bridging/classificationLabel.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;AAEzD,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;gBAGlC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,MAAM;IAShC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,mBAAmB;IAUzE,MAAM,IAAI,uBAAuB;CASpC"}
@@ -0,0 +1,12 @@
1
+ import { ClassificationLabel as NapiClassificationLabel } from "../napi/uzu.js";
2
+ export declare class ClassificationLabel {
3
+ readonly index: number;
4
+ readonly label: string;
5
+ readonly title: string;
6
+ readonly description: string;
7
+ readonly recommendedThreshold: number;
8
+ constructor(index: number, label: string, title: string, description: string, recommendedThreshold: number);
9
+ static fromNapi(napiEntity: NapiClassificationLabel): ClassificationLabel;
10
+ toNapi(): NapiClassificationLabel;
11
+ }
12
+ //# sourceMappingURL=classificationLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationLabel.d.ts","sourceRoot":"","sources":["../src/bridging/classificationLabel.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;AAEzD,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;gBAGlC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,MAAM;IAShC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,mBAAmB;IAUzE,MAAM,IAAI,uBAAuB;CASpC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClassificationLabel = void 0;
4
+ class ClassificationLabel {
5
+ constructor(index, label, title, description, recommendedThreshold) {
6
+ this.index = index;
7
+ this.label = label;
8
+ this.title = title;
9
+ this.description = description;
10
+ this.recommendedThreshold = recommendedThreshold;
11
+ }
12
+ static fromNapi(napiEntity) {
13
+ return new ClassificationLabel(napiEntity.index, napiEntity.label, napiEntity.title, napiEntity.description, napiEntity.recommendedThreshold);
14
+ }
15
+ toNapi() {
16
+ return {
17
+ index: this.index,
18
+ label: this.label,
19
+ title: this.title,
20
+ description: this.description,
21
+ recommendedThreshold: this.recommendedThreshold,
22
+ };
23
+ }
24
+ }
25
+ exports.ClassificationLabel = ClassificationLabel;
26
+ //# sourceMappingURL=classificationLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationLabel.js","sourceRoot":"","sources":["../src/bridging/classificationLabel.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IAO5B,YACI,KAAa,EACb,KAAa,EACb,KAAa,EACb,WAAmB,EACnB,oBAA4B;QAE5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAmC;QAC/C,OAAO,IAAI,mBAAmB,CAC1B,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,WAAW,EACtB,UAAU,CAAC,oBAAoB,CAClC,CAAC;IACN,CAAC;IAED,MAAM;QACF,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAClD,CAAC;IACN,CAAC;CACJ;AAxCD,kDAwCC"}
@@ -0,0 +1,22 @@
1
+ export class ClassificationLabel {
2
+ constructor(index, label, title, description, recommendedThreshold) {
3
+ this.index = index;
4
+ this.label = label;
5
+ this.title = title;
6
+ this.description = description;
7
+ this.recommendedThreshold = recommendedThreshold;
8
+ }
9
+ static fromNapi(napiEntity) {
10
+ return new ClassificationLabel(napiEntity.index, napiEntity.label, napiEntity.title, napiEntity.description, napiEntity.recommendedThreshold);
11
+ }
12
+ toNapi() {
13
+ return {
14
+ index: this.index,
15
+ label: this.label,
16
+ title: this.title,
17
+ description: this.description,
18
+ recommendedThreshold: this.recommendedThreshold,
19
+ };
20
+ }
21
+ }
22
+ //# sourceMappingURL=classificationLabel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationLabel.mjs","sourceRoot":"","sources":["../src/bridging/classificationLabel.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;IAO5B,YACI,KAAa,EACb,KAAa,EACb,KAAa,EACb,WAAmB,EACnB,oBAA4B;QAE5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAmC;QAC/C,OAAO,IAAI,mBAAmB,CAC1B,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,WAAW,EACtB,UAAU,CAAC,oBAAoB,CAClC,CAAC;IACN,CAAC;IAED,MAAM;QACF,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAClD,CAAC;IACN,CAAC;CACJ"}
@@ -0,0 +1,10 @@
1
+ import { ClassificationOutput as NapiClassificationOutput } from "../napi/uzu.mjs";
2
+ import { ClassificationStats } from "./classificationStats.mjs";
3
+ export declare class ClassificationOutput {
4
+ readonly logits: number[];
5
+ readonly probabilities: Record<string, number>;
6
+ readonly stats: ClassificationStats;
7
+ constructor(logits: number[], probabilities: Record<string, number>, stats: ClassificationStats);
8
+ static fromNapi(napiEntity: NapiClassificationOutput): ClassificationOutput;
9
+ }
10
+ //# sourceMappingURL=classificationOutput.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationOutput.d.mts","sourceRoot":"","sources":["../src/bridging/classificationOutput.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,IAAI,wBAAwB,EAAE;OACpD,EAAE,mBAAmB,EAAE;AAE9B,qBAAa,oBAAoB;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;gBAExB,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAM/F,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,wBAAwB,GAAG,oBAAoB;CAO9E"}
@@ -0,0 +1,10 @@
1
+ import { ClassificationOutput as NapiClassificationOutput } from "../napi/uzu.js";
2
+ import { ClassificationStats } from "./classificationStats.js";
3
+ export declare class ClassificationOutput {
4
+ readonly logits: number[];
5
+ readonly probabilities: Record<string, number>;
6
+ readonly stats: ClassificationStats;
7
+ constructor(logits: number[], probabilities: Record<string, number>, stats: ClassificationStats);
8
+ static fromNapi(napiEntity: NapiClassificationOutput): ClassificationOutput;
9
+ }
10
+ //# sourceMappingURL=classificationOutput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationOutput.d.ts","sourceRoot":"","sources":["../src/bridging/classificationOutput.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,IAAI,wBAAwB,EAAE;OACpD,EAAE,mBAAmB,EAAE;AAE9B,qBAAa,oBAAoB;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;gBAExB,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAM/F,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,wBAAwB,GAAG,oBAAoB;CAO9E"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClassificationOutput = void 0;
4
+ const classificationStats_1 = require("./classificationStats.js");
5
+ class ClassificationOutput {
6
+ constructor(logits, probabilities, stats) {
7
+ this.logits = logits;
8
+ this.probabilities = probabilities;
9
+ this.stats = stats;
10
+ }
11
+ static fromNapi(napiEntity) {
12
+ return new ClassificationOutput(napiEntity.logits, napiEntity.probabilities, classificationStats_1.ClassificationStats.fromNapi(napiEntity.stats));
13
+ }
14
+ }
15
+ exports.ClassificationOutput = ClassificationOutput;
16
+ //# sourceMappingURL=classificationOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationOutput.js","sourceRoot":"","sources":["../src/bridging/classificationOutput.ts"],"names":[],"mappings":";;;AACA,kEAA4D;AAE5D,MAAa,oBAAoB;IAK7B,YAAY,MAAgB,EAAE,aAAqC,EAAE,KAA0B;QAC3F,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAoC;QAChD,OAAO,IAAI,oBAAoB,CAC3B,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,aAAa,EACxB,yCAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CACjD,CAAC;IACN,CAAC;CACJ;AAlBD,oDAkBC"}
@@ -0,0 +1,12 @@
1
+ import { ClassificationStats } from "./classificationStats.mjs";
2
+ export class ClassificationOutput {
3
+ constructor(logits, probabilities, stats) {
4
+ this.logits = logits;
5
+ this.probabilities = probabilities;
6
+ this.stats = stats;
7
+ }
8
+ static fromNapi(napiEntity) {
9
+ return new ClassificationOutput(napiEntity.logits, napiEntity.probabilities, ClassificationStats.fromNapi(napiEntity.stats));
10
+ }
11
+ }
12
+ //# sourceMappingURL=classificationOutput.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationOutput.mjs","sourceRoot":"","sources":["../src/bridging/classificationOutput.ts"],"names":[],"mappings":"OACO,EAAE,mBAAmB,EAAE;AAE9B,MAAM,OAAO,oBAAoB;IAK7B,YAAY,MAAgB,EAAE,aAAqC,EAAE,KAA0B;QAC3F,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAoC;QAChD,OAAO,IAAI,oBAAoB,CAC3B,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,aAAa,EACxB,mBAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CACjD,CAAC;IACN,CAAC;CACJ"}
@@ -0,0 +1,9 @@
1
+ import { ClassificationSession as NapiClassificationSession } from "../napi/uzu.mjs";
2
+ import { ClassificationOutput } from "./classificationOutput.mjs";
3
+ import { Input } from "./input.mjs";
4
+ export declare class ClassificationSession {
5
+ private readonly napiClassificationSession;
6
+ constructor(napiClassificationSession: NapiClassificationSession);
7
+ run(input: Input): ClassificationOutput;
8
+ }
9
+ //# sourceMappingURL=classificationSession.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationSession.d.mts","sourceRoot":"","sources":["../src/bridging/classificationSession.ts"],"names":[],"mappings":"OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE;OACtD,EAAE,oBAAoB,EAAE;OACxB,EAAE,KAAK,EAAE;AAEhB,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA4B;gBAE1D,yBAAyB,EAAE,yBAAyB;IAIhE,GAAG,CAAC,KAAK,EAAE,KAAK,GAAG,oBAAoB;CAK1C"}
@@ -0,0 +1,9 @@
1
+ import { ClassificationSession as NapiClassificationSession } from "../napi/uzu.js";
2
+ import { ClassificationOutput } from "./classificationOutput.js";
3
+ import { Input } from "./input.js";
4
+ export declare class ClassificationSession {
5
+ private readonly napiClassificationSession;
6
+ constructor(napiClassificationSession: NapiClassificationSession);
7
+ run(input: Input): ClassificationOutput;
8
+ }
9
+ //# sourceMappingURL=classificationSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationSession.d.ts","sourceRoot":"","sources":["../src/bridging/classificationSession.ts"],"names":[],"mappings":"OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE;OACtD,EAAE,oBAAoB,EAAE;OACxB,EAAE,KAAK,EAAE;AAEhB,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA4B;gBAE1D,yBAAyB,EAAE,yBAAyB;IAIhE,GAAG,CAAC,KAAK,EAAE,KAAK,GAAG,oBAAoB;CAK1C"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClassificationSession = void 0;
4
+ const classificationOutput_1 = require("./classificationOutput.js");
5
+ class ClassificationSession {
6
+ constructor(napiClassificationSession) {
7
+ this.napiClassificationSession = napiClassificationSession;
8
+ }
9
+ run(input) {
10
+ const napiInput = input.toNapi();
11
+ const napiOutput = this.napiClassificationSession.run(napiInput);
12
+ return classificationOutput_1.ClassificationOutput.fromNapi(napiOutput);
13
+ }
14
+ }
15
+ exports.ClassificationSession = ClassificationSession;
16
+ //# sourceMappingURL=classificationSession.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationSession.js","sourceRoot":"","sources":["../src/bridging/classificationSession.ts"],"names":[],"mappings":";;;AACA,oEAA8D;AAG9D,MAAa,qBAAqB;IAG9B,YAAY,yBAAoD;QAC5D,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC/D,CAAC;IAED,GAAG,CAAC,KAAY;QACZ,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjE,OAAO,2CAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;CACJ;AAZD,sDAYC"}
@@ -0,0 +1,12 @@
1
+ import { ClassificationOutput } from "./classificationOutput.mjs";
2
+ export class ClassificationSession {
3
+ constructor(napiClassificationSession) {
4
+ this.napiClassificationSession = napiClassificationSession;
5
+ }
6
+ run(input) {
7
+ const napiInput = input.toNapi();
8
+ const napiOutput = this.napiClassificationSession.run(napiInput);
9
+ return ClassificationOutput.fromNapi(napiOutput);
10
+ }
11
+ }
12
+ //# sourceMappingURL=classificationSession.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationSession.mjs","sourceRoot":"","sources":["../src/bridging/classificationSession.ts"],"names":[],"mappings":"OACO,EAAE,oBAAoB,EAAE;AAG/B,MAAM,OAAO,qBAAqB;IAG9B,YAAY,yBAAoD;QAC5D,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC/D,CAAC;IAED,GAAG,CAAC,KAAY;QACZ,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjE,OAAO,oBAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;CACJ"}
@@ -0,0 +1,14 @@
1
+ import { ClassificationStats as NapiClassificationStats } from "../napi/uzu.mjs";
2
+ export declare class ClassificationStats {
3
+ readonly preprocessingDuration: number;
4
+ readonly forwardPassDuration: number;
5
+ readonly postprocessingDuration: number;
6
+ readonly totalDuration: number;
7
+ readonly tokensCount: number;
8
+ readonly tokensPerSecond: number;
9
+ readonly predictedLabel: string;
10
+ readonly confidence: number;
11
+ constructor(preprocessingDuration: number, forwardPassDuration: number, postprocessingDuration: number, totalDuration: number, tokensCount: number, tokensPerSecond: number, predictedLabel: string, confidence: number);
12
+ static fromNapi(napiEntity: NapiClassificationStats): ClassificationStats;
13
+ }
14
+ //# sourceMappingURL=classificationStats.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationStats.d.mts","sourceRoot":"","sources":["../src/bridging/classificationStats.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;AAEzD,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAGxB,qBAAqB,EAAE,MAAM,EAC7B,mBAAmB,EAAE,MAAM,EAC3B,sBAAsB,EAAE,MAAM,EAC9B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM;IAYtB,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,mBAAmB;CAY5E"}
@@ -0,0 +1,14 @@
1
+ import { ClassificationStats as NapiClassificationStats } from "../napi/uzu.js";
2
+ export declare class ClassificationStats {
3
+ readonly preprocessingDuration: number;
4
+ readonly forwardPassDuration: number;
5
+ readonly postprocessingDuration: number;
6
+ readonly totalDuration: number;
7
+ readonly tokensCount: number;
8
+ readonly tokensPerSecond: number;
9
+ readonly predictedLabel: string;
10
+ readonly confidence: number;
11
+ constructor(preprocessingDuration: number, forwardPassDuration: number, postprocessingDuration: number, totalDuration: number, tokensCount: number, tokensPerSecond: number, predictedLabel: string, confidence: number);
12
+ static fromNapi(napiEntity: NapiClassificationStats): ClassificationStats;
13
+ }
14
+ //# sourceMappingURL=classificationStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationStats.d.ts","sourceRoot":"","sources":["../src/bridging/classificationStats.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE;AAEzD,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAGxB,qBAAqB,EAAE,MAAM,EAC7B,mBAAmB,EAAE,MAAM,EAC3B,sBAAsB,EAAE,MAAM,EAC9B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM;IAYtB,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,mBAAmB;CAY5E"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClassificationStats = void 0;
4
+ class ClassificationStats {
5
+ constructor(preprocessingDuration, forwardPassDuration, postprocessingDuration, totalDuration, tokensCount, tokensPerSecond, predictedLabel, confidence) {
6
+ this.preprocessingDuration = preprocessingDuration;
7
+ this.forwardPassDuration = forwardPassDuration;
8
+ this.postprocessingDuration = postprocessingDuration;
9
+ this.totalDuration = totalDuration;
10
+ this.tokensCount = tokensCount;
11
+ this.tokensPerSecond = tokensPerSecond;
12
+ this.predictedLabel = predictedLabel;
13
+ this.confidence = confidence;
14
+ }
15
+ static fromNapi(napiEntity) {
16
+ return new ClassificationStats(napiEntity.preprocessingDuration, napiEntity.forwardPassDuration, napiEntity.postprocessingDuration, napiEntity.totalDuration, napiEntity.tokensCount, napiEntity.tokensPerSecond, napiEntity.predictedLabel, napiEntity.confidence);
17
+ }
18
+ }
19
+ exports.ClassificationStats = ClassificationStats;
20
+ //# sourceMappingURL=classificationStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationStats.js","sourceRoot":"","sources":["../src/bridging/classificationStats.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IAU5B,YACI,qBAA6B,EAC7B,mBAA2B,EAC3B,sBAA8B,EAC9B,aAAqB,EACrB,WAAmB,EACnB,eAAuB,EACvB,cAAsB,EACtB,UAAkB;QAElB,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAmC;QAC/C,OAAO,IAAI,mBAAmB,CAC1B,UAAU,CAAC,qBAAqB,EAChC,UAAU,CAAC,mBAAmB,EAC9B,UAAU,CAAC,sBAAsB,EACjC,UAAU,CAAC,aAAa,EACxB,UAAU,CAAC,WAAW,EACtB,UAAU,CAAC,eAAe,EAC1B,UAAU,CAAC,cAAc,EACzB,UAAU,CAAC,UAAU,CACxB,CAAC;IACN,CAAC;CACJ;AA1CD,kDA0CC"}
@@ -0,0 +1,16 @@
1
+ export class ClassificationStats {
2
+ constructor(preprocessingDuration, forwardPassDuration, postprocessingDuration, totalDuration, tokensCount, tokensPerSecond, predictedLabel, confidence) {
3
+ this.preprocessingDuration = preprocessingDuration;
4
+ this.forwardPassDuration = forwardPassDuration;
5
+ this.postprocessingDuration = postprocessingDuration;
6
+ this.totalDuration = totalDuration;
7
+ this.tokensCount = tokensCount;
8
+ this.tokensPerSecond = tokensPerSecond;
9
+ this.predictedLabel = predictedLabel;
10
+ this.confidence = confidence;
11
+ }
12
+ static fromNapi(napiEntity) {
13
+ return new ClassificationStats(napiEntity.preprocessingDuration, napiEntity.forwardPassDuration, napiEntity.postprocessingDuration, napiEntity.totalDuration, napiEntity.tokensCount, napiEntity.tokensPerSecond, napiEntity.predictedLabel, napiEntity.confidence);
14
+ }
15
+ }
16
+ //# sourceMappingURL=classificationStats.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classificationStats.mjs","sourceRoot":"","sources":["../src/bridging/classificationStats.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;IAU5B,YACI,qBAA6B,EAC7B,mBAA2B,EAC3B,sBAA8B,EAC9B,aAAqB,EACrB,WAAmB,EACnB,eAAuB,EACvB,cAAsB,EACtB,UAAkB;QAElB,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAmC;QAC/C,OAAO,IAAI,mBAAmB,CAC1B,UAAU,CAAC,qBAAqB,EAChC,UAAU,CAAC,mBAAmB,EAC9B,UAAU,CAAC,sBAAsB,EACjC,UAAU,CAAC,aAAa,EACxB,UAAU,CAAC,WAAW,EACtB,UAAU,CAAC,eAAe,EAC1B,UAAU,CAAC,cAAc,EACzB,UAAU,CAAC,UAAU,CACxB,CAAC;IACN,CAAC;CACJ"}
@@ -1,11 +1,13 @@
1
1
  import { EngineInteractor } from "../interactors/engineInteractor.mjs";
2
- import { ChatModel } from "./chatModel.mjs";
3
2
  import { ChatSession } from "./chatSession.mjs";
3
+ import { ClassificationSession } from "./classificationSession.mjs";
4
4
  import { Config } from "./config.mjs";
5
5
  import { DownloadHandle } from "./downloadHandle.mjs";
6
6
  import { DownloadProgressUpdate } from "./downloadProgressUpdate.mjs";
7
7
  import { DownloadState } from "./downloadState.mjs";
8
- import { ModelType } from "./modelType.mjs";
8
+ import { Model } from "./model.mjs";
9
+ import { ModelKind } from "./modelKind.mjs";
10
+ import { TextToSpeechSession } from "./textToSpeechSession.mjs";
9
11
  export declare class Engine {
10
12
  private readonly napiEngine;
11
13
  private constructor();
@@ -13,9 +15,15 @@ export declare class Engine {
13
15
  static create(apiKey?: string | undefined): EngineInteractor;
14
16
  getDownloadState(repoId: string): DownloadState;
15
17
  downloadHandle(repoId: string): DownloadHandle;
16
- chatModels(types?: ModelType[] | null): Promise<ChatModel[]>;
17
- chatModel(repoId: string, types?: ModelType[] | null): Promise<ChatModel>;
18
- downloadChatModel(chatModel: ChatModel, progress?: (progressUpdate: DownloadProgressUpdate) => void): Promise<DownloadState>;
19
- chatSession(chatModel: ChatModel, config?: Config): ChatSession;
18
+ downloadModel(model: Model, progress?: (progressUpdate: DownloadProgressUpdate) => void): Promise<DownloadState>;
19
+ chatModels(kinds?: ModelKind[] | null): Promise<Model[]>;
20
+ chatModel(repoId: string, kinds?: ModelKind[] | null): Promise<Model>;
21
+ chatSession(model: Model, config?: Config): ChatSession;
22
+ classificationModels(): Promise<Model[]>;
23
+ classificationModel(repoId: string): Promise<Model>;
24
+ classificationSession(model: Model): ClassificationSession;
25
+ textToSpeechModels(): Promise<Model[]>;
26
+ textToSpeechModel(repoId: string): Promise<Model>;
27
+ textToSpeechSession(model: Model): TextToSpeechSession;
20
28
  }
21
29
  //# sourceMappingURL=engine.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.mts","sourceRoot":"","sources":["../src/bridging/engine.ts"],"names":[],"mappings":"OAC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"./chatSession.js";
3
+ import { ClassificationSession } from "./classificationSession.js";
4
4
  import { Config } from "./config.js";
5
5
  import { DownloadHandle } from "./downloadHandle.js";
6
6
  import { DownloadProgressUpdate } from "./downloadProgressUpdate.js";
7
7
  import { DownloadState } from "./downloadState.js";
8
- import { ModelType } from "./modelType.js";
8
+ import { Model } from "./model.js";
9
+ import { ModelKind } from "./modelKind.js";
10
+ import { TextToSpeechSession } from "./textToSpeechSession.js";
9
11
  export declare class Engine {
10
12
  private readonly napiEngine;
11
13
  private constructor();
@@ -13,9 +15,15 @@ export declare class Engine {
13
15
  static create(apiKey?: string | undefined): EngineInteractor;
14
16
  getDownloadState(repoId: string): DownloadState;
15
17
  downloadHandle(repoId: string): DownloadHandle;
16
- chatModels(types?: ModelType[] | null): Promise<ChatModel[]>;
17
- chatModel(repoId: string, types?: ModelType[] | null): Promise<ChatModel>;
18
- downloadChatModel(chatModel: ChatModel, progress?: (progressUpdate: DownloadProgressUpdate) => void): Promise<DownloadState>;
19
- chatSession(chatModel: ChatModel, config?: Config): ChatSession;
18
+ downloadModel(model: Model, progress?: (progressUpdate: DownloadProgressUpdate) => void): Promise<DownloadState>;
19
+ chatModels(kinds?: ModelKind[] | null): Promise<Model[]>;
20
+ chatModel(repoId: string, kinds?: ModelKind[] | null): Promise<Model>;
21
+ chatSession(model: Model, config?: Config): ChatSession;
22
+ classificationModels(): Promise<Model[]>;
23
+ classificationModel(repoId: string): Promise<Model>;
24
+ classificationSession(model: Model): ClassificationSession;
25
+ textToSpeechModels(): Promise<Model[]>;
26
+ textToSpeechModel(repoId: string): Promise<Model>;
27
+ textToSpeechSession(model: Model): TextToSpeechSession;
20
28
  }
21
29
  //# sourceMappingURL=engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/bridging/engine.ts"],"names":[],"mappings":"OACO,EAAE,gBAAgB,EAAE;OAGpB,EAAE,SAAS,EAAE;OACb,EAAE,WAAW,EAAE;OACf,EA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,CAAC,UAAU,CAAa;IAExC,OAAO;WAIM,IAAI,CAAC,MAAM,GAAE,MAAM,GAAG,SAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IAqB1E,MAAM,CAAC,MAAM,CAAC,MAAM,GAAE,MAAM,GAAG,SAAqB,GAAG,gBAAgB;IAOvE,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAK/C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;IAIxC,aAAa,CACf,KAAK,EAAE,KAAK,EACZ,QAAQ,GAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,IAAe,GACtE,OAAO,CAAC,aAAa,CAAC;IAyBnB,UAAU,CAAC,KAAK,GAAE,SAAS,EAAE,GAAG,IAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAQ9D,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,EAAE,GAAG,IAAW,GAAG,OAAO,CAAC,KAAK,CAAC;IAMjF,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,GAAE,MAAyB,GAAG,WAAW;IAMnE,oBAAoB,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAMxC,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAMzD,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB;IAKpD,kBAAkB,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAMtC,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAMvD,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,mBAAmB;CAIzD"}
@@ -5,13 +5,15 @@ const error_1 = require("../error.js");
5
5
  const engineInteractor_1 = require("../interactors/engineInteractor.js");
6
6
  const uzu_1 = require("../napi/uzu.js");
7
7
  const env_1 = require("../utilities/env.js");
8
- const chatModel_1 = require("./chatModel.js");
9
8
  const chatSession_1 = require("./chatSession.js");
9
+ const classificationSession_1 = require("./classificationSession.js");
10
10
  const config_1 = require("./config.js");
11
11
  const downloadHandle_1 = require("./downloadHandle.js");
12
12
  const downloadState_1 = require("./downloadState.js");
13
13
  const licenseStatus_1 = require("./licenseStatus.js");
14
- const modelType_1 = require("./modelType.js");
14
+ const model_1 = require("./model.js");
15
+ const modelKind_1 = require("./modelKind.js");
16
+ const textToSpeechSession_1 = require("./textToSpeechSession.js");
15
17
  class Engine {
16
18
  constructor(napiEngine) {
17
19
  this.napiEngine = napiEngine;
@@ -43,26 +45,14 @@ class Engine {
43
45
  downloadHandle(repoId) {
44
46
  return new downloadHandle_1.DownloadHandle(this.napiEngine.createModelDownloadHandle(repoId));
45
47
  }
46
- async chatModels(types = null) {
47
- let typesToFilter = types ?? [modelType_1.ModelType.Local, modelType_1.ModelType.Cloud];
48
- let napiModelTypes = typesToFilter.map(modelType_1.modelTypeToNapiModelType);
49
- let napiChatModels = await this.napiEngine.getChatModels(napiModelTypes);
50
- let results = napiChatModels.map(chatModel_1.ChatModel.fromNapiChatModel);
51
- return results;
52
- }
53
- async chatModel(repoId, types = null) {
54
- const chatModels = await this.chatModels(types);
55
- const chatModel = chatModels.find((model) => model.repoId === repoId);
56
- return (0, error_1.unwrapOrThrow)(chatModel, error_1.EngineErrorCode.ModelNotFound);
57
- }
58
- async downloadChatModel(chatModel, progress = () => { }) {
59
- switch (chatModel.type) {
60
- case modelType_1.ModelType.Local:
48
+ async downloadModel(model, progress = () => { }) {
49
+ switch (model.kind) {
50
+ case modelKind_1.ModelKind.Local:
61
51
  break;
62
- case modelType_1.ModelType.Cloud:
63
- throw new error_1.EngineError(error_1.EngineErrorCode.UnexpectedModelType);
52
+ case modelKind_1.ModelKind.Cloud:
53
+ throw new error_1.EngineError(error_1.EngineErrorCode.UnexpectedModelKind);
64
54
  }
65
- const downloadHandle = this.downloadHandle(chatModel.repoId);
55
+ const downloadHandle = this.downloadHandle(model.repoId);
66
56
  const state = await downloadHandle.state();
67
57
  switch (state.phase) {
68
58
  case downloadState_1.DownloadPhase.Downloaded:
@@ -77,10 +67,50 @@ class Engine {
77
67
  const finalState = await downloadHandle.state();
78
68
  return finalState;
79
69
  }
80
- chatSession(chatModel, config = config_1.Config.default()) {
81
- const napiChatModel = chatModel.toNapi();
70
+ async chatModels(kinds = null) {
71
+ let kindsToFilter = kinds ?? [modelKind_1.ModelKind.Local, modelKind_1.ModelKind.Cloud];
72
+ let napiModelKinds = kindsToFilter.map(modelKind_1.modelKindToNapiModelKind);
73
+ let napiChatModels = await this.napiEngine.getChatModels(napiModelKinds);
74
+ let results = napiChatModels.map(model_1.Model.fromNapiModel);
75
+ return results;
76
+ }
77
+ async chatModel(repoId, kinds = null) {
78
+ const chatModels = await this.chatModels(kinds);
79
+ const chatModel = chatModels.find((model) => model.repoId === repoId);
80
+ return (0, error_1.unwrapOrThrow)(chatModel, error_1.EngineErrorCode.ModelNotFound);
81
+ }
82
+ chatSession(model, config = config_1.Config.default()) {
83
+ const napiModel = model.toNapi();
82
84
  const napiConfig = config.toNapi();
83
- return new chatSession_1.ChatSession(this.napiEngine.createChatSession(napiChatModel, napiConfig));
85
+ return new chatSession_1.ChatSession(this.napiEngine.createChatSession(napiModel, napiConfig));
86
+ }
87
+ async classificationModels() {
88
+ const napiClassificationModels = await this.napiEngine.getClassificationModels();
89
+ const results = napiClassificationModels.map(model_1.Model.fromNapiModel);
90
+ return results;
91
+ }
92
+ async classificationModel(repoId) {
93
+ const classificationModels = await this.classificationModels();
94
+ const classificationModel = classificationModels.find((model) => model.repoId === repoId);
95
+ return (0, error_1.unwrapOrThrow)(classificationModel, error_1.EngineErrorCode.ModelNotFound);
96
+ }
97
+ classificationSession(model) {
98
+ const napiModel = model.toNapi();
99
+ return new classificationSession_1.ClassificationSession(this.napiEngine.createClassificationSession(napiModel));
100
+ }
101
+ async textToSpeechModels() {
102
+ const napiTextToSpeechModels = await this.napiEngine.getTextToSpeechModels();
103
+ const results = napiTextToSpeechModels.map(model_1.Model.fromNapiModel);
104
+ return results;
105
+ }
106
+ async textToSpeechModel(repoId) {
107
+ const textToSpeechModels = await this.textToSpeechModels();
108
+ const textToSpeechModel = textToSpeechModels.find((model) => model.repoId === repoId);
109
+ return (0, error_1.unwrapOrThrow)(textToSpeechModel, error_1.EngineErrorCode.ModelNotFound);
110
+ }
111
+ textToSpeechSession(model) {
112
+ const napiModel = model.toNapi();
113
+ return new textToSpeechSession_1.TextToSpeechSession(this.napiEngine.createTextToSpeechSession(napiModel));
84
114
  }
85
115
  }
86
116
  exports.Engine = Engine;
@@ -1 +1 @@
1
- {"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/bridging/engine.ts"],"names":[],"mappings":";;;AAAA,uCAAuE;AACvE,yEAAmE;AACnE,wCAAmD;AACnD,6CAA2C;AAC3C,8CAAwC;AACxC,kDAA4C;AAC5C,wCAAkC;AAClC,wDAAkD;AAElD,sDAA+D;AAC/D,sDAAoF;AACpF,8CAAkE;AAElE,MAAa,MAAM;IAGf,YAAoB,UAAsB;QACtC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAA6B,SAAS;QACpD,MAAM,cAAc,GAAG,IAAA,qBAAa,EAChC,MAAM,IAAI,IAAA,aAAO,EAAC,eAAe,CAAC,EAClC,uBAAe,CAAC,cAAc,CACjC,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,YAAU,EAAE,CAAC;QAEpC,MAAM,iBAAiB,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACpE,MAAM,aAAa,GAAG,IAAA,kDAAkC,EAAC,iBAAiB,CAAC,CAAC;QAC5E,QAAQ,aAAa,EAAE,CAAC;YACpB,KAAK,6BAAa,CAAC,SAAS,CAAC;YAC7B,KAAK,6BAAa,CAAC,iBAAiB;gBAChC,MAAM;YACV;gBACI,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,mBAA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