@trymirai/uzu 0.3.1 → 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.
Files changed (455) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +253 -245
  3. package/index.d.mts +1 -43
  4. package/index.d.mts.map +1 -1
  5. package/index.d.ts +1 -43
  6. package/index.d.ts.map +1 -1
  7. package/index.js +2 -88
  8. package/index.js.map +1 -1
  9. package/index.mjs +1 -43
  10. package/index.mjs.map +1 -1
  11. package/internal/tslib.js +6 -33
  12. package/napi/index.d.ts +975 -0
  13. package/napi/index.js +626 -0
  14. package/napi/index.mjs +3 -0
  15. package/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
  16. package/package.json +26 -63
  17. package/src/index.ts +1 -43
  18. package/src/napi/index.d.ts +975 -0
  19. package/src/napi/index.js +626 -0
  20. package/src/napi/index.mjs +3 -0
  21. package/src/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
  22. package/src/version.ts +1 -1
  23. package/version.d.mts +1 -1
  24. package/version.d.ts +1 -1
  25. package/version.js +1 -1
  26. package/version.mjs +1 -1
  27. package/bridging/asyncBatchSize.d.mts +0 -10
  28. package/bridging/asyncBatchSize.d.mts.map +0 -1
  29. package/bridging/asyncBatchSize.d.ts +0 -10
  30. package/bridging/asyncBatchSize.d.ts.map +0 -1
  31. package/bridging/asyncBatchSize.js +0 -21
  32. package/bridging/asyncBatchSize.js.map +0 -1
  33. package/bridging/asyncBatchSize.mjs +0 -17
  34. package/bridging/asyncBatchSize.mjs.map +0 -1
  35. package/bridging/chatSession.d.mts +0 -11
  36. package/bridging/chatSession.d.mts.map +0 -1
  37. package/bridging/chatSession.d.ts +0 -11
  38. package/bridging/chatSession.d.ts.map +0 -1
  39. package/bridging/chatSession.js +0 -22
  40. package/bridging/chatSession.js.map +0 -1
  41. package/bridging/chatSession.mjs +0 -18
  42. package/bridging/chatSession.mjs.map +0 -1
  43. package/bridging/classificationFeature.d.mts +0 -9
  44. package/bridging/classificationFeature.d.mts.map +0 -1
  45. package/bridging/classificationFeature.d.ts +0 -9
  46. package/bridging/classificationFeature.d.ts.map +0 -1
  47. package/bridging/classificationFeature.js +0 -18
  48. package/bridging/classificationFeature.js.map +0 -1
  49. package/bridging/classificationFeature.mjs +0 -14
  50. package/bridging/classificationFeature.mjs.map +0 -1
  51. package/bridging/classificationLabel.d.mts +0 -12
  52. package/bridging/classificationLabel.d.mts.map +0 -1
  53. package/bridging/classificationLabel.d.ts +0 -12
  54. package/bridging/classificationLabel.d.ts.map +0 -1
  55. package/bridging/classificationLabel.js +0 -26
  56. package/bridging/classificationLabel.js.map +0 -1
  57. package/bridging/classificationLabel.mjs +0 -22
  58. package/bridging/classificationLabel.mjs.map +0 -1
  59. package/bridging/classificationOutput.d.mts +0 -10
  60. package/bridging/classificationOutput.d.mts.map +0 -1
  61. package/bridging/classificationOutput.d.ts +0 -10
  62. package/bridging/classificationOutput.d.ts.map +0 -1
  63. package/bridging/classificationOutput.js +0 -16
  64. package/bridging/classificationOutput.js.map +0 -1
  65. package/bridging/classificationOutput.mjs +0 -12
  66. package/bridging/classificationOutput.mjs.map +0 -1
  67. package/bridging/classificationSession.d.mts +0 -9
  68. package/bridging/classificationSession.d.mts.map +0 -1
  69. package/bridging/classificationSession.d.ts +0 -9
  70. package/bridging/classificationSession.d.ts.map +0 -1
  71. package/bridging/classificationSession.js +0 -16
  72. package/bridging/classificationSession.js.map +0 -1
  73. package/bridging/classificationSession.mjs +0 -12
  74. package/bridging/classificationSession.mjs.map +0 -1
  75. package/bridging/classificationStats.d.mts +0 -14
  76. package/bridging/classificationStats.d.mts.map +0 -1
  77. package/bridging/classificationStats.d.ts +0 -14
  78. package/bridging/classificationStats.d.ts.map +0 -1
  79. package/bridging/classificationStats.js +0 -20
  80. package/bridging/classificationStats.js.map +0 -1
  81. package/bridging/classificationStats.mjs +0 -16
  82. package/bridging/classificationStats.mjs.map +0 -1
  83. package/bridging/config.d.mts +0 -26
  84. package/bridging/config.d.mts.map +0 -1
  85. package/bridging/config.d.ts +0 -26
  86. package/bridging/config.d.ts.map +0 -1
  87. package/bridging/config.js +0 -53
  88. package/bridging/config.js.map +0 -1
  89. package/bridging/config.mjs +0 -49
  90. package/bridging/config.mjs.map +0 -1
  91. package/bridging/contextLength.d.mts +0 -11
  92. package/bridging/contextLength.d.mts.map +0 -1
  93. package/bridging/contextLength.d.ts +0 -11
  94. package/bridging/contextLength.d.ts.map +0 -1
  95. package/bridging/contextLength.js +0 -25
  96. package/bridging/contextLength.js.map +0 -1
  97. package/bridging/contextLength.mjs +0 -21
  98. package/bridging/contextLength.mjs.map +0 -1
  99. package/bridging/contextMode.d.mts +0 -12
  100. package/bridging/contextMode.d.mts.map +0 -1
  101. package/bridging/contextMode.d.ts +0 -12
  102. package/bridging/contextMode.d.ts.map +0 -1
  103. package/bridging/contextMode.js +0 -26
  104. package/bridging/contextMode.js.map +0 -1
  105. package/bridging/contextMode.mjs +0 -22
  106. package/bridging/contextMode.mjs.map +0 -1
  107. package/bridging/downloadHandle.d.mts +0 -14
  108. package/bridging/downloadHandle.d.mts.map +0 -1
  109. package/bridging/downloadHandle.d.ts +0 -14
  110. package/bridging/downloadHandle.d.ts.map +0 -1
  111. package/bridging/downloadHandle.js +0 -36
  112. package/bridging/downloadHandle.js.map +0 -1
  113. package/bridging/downloadHandle.mjs +0 -32
  114. package/bridging/downloadHandle.mjs.map +0 -1
  115. package/bridging/downloadProgressUpdate.d.mts +0 -9
  116. package/bridging/downloadProgressUpdate.d.mts.map +0 -1
  117. package/bridging/downloadProgressUpdate.d.ts +0 -9
  118. package/bridging/downloadProgressUpdate.d.ts.map +0 -1
  119. package/bridging/downloadProgressUpdate.js +0 -15
  120. package/bridging/downloadProgressUpdate.js.map +0 -1
  121. package/bridging/downloadProgressUpdate.mjs +0 -11
  122. package/bridging/downloadProgressUpdate.mjs.map +0 -1
  123. package/bridging/downloadState.d.mts +0 -19
  124. package/bridging/downloadState.d.mts.map +0 -1
  125. package/bridging/downloadState.d.ts +0 -19
  126. package/bridging/downloadState.d.ts.map +0 -1
  127. package/bridging/downloadState.js +0 -45
  128. package/bridging/downloadState.js.map +0 -1
  129. package/bridging/downloadState.mjs +0 -41
  130. package/bridging/downloadState.mjs.map +0 -1
  131. package/bridging/engine.d.mts +0 -29
  132. package/bridging/engine.d.mts.map +0 -1
  133. package/bridging/engine.d.ts +0 -29
  134. package/bridging/engine.d.ts.map +0 -1
  135. package/bridging/engine.js +0 -117
  136. package/bridging/engine.js.map +0 -1
  137. package/bridging/engine.mjs +0 -113
  138. package/bridging/engine.mjs.map +0 -1
  139. package/bridging/finishReason.d.mts +0 -7
  140. package/bridging/finishReason.d.mts.map +0 -1
  141. package/bridging/finishReason.d.ts +0 -7
  142. package/bridging/finishReason.d.ts.map +0 -1
  143. package/bridging/finishReason.js +0 -11
  144. package/bridging/finishReason.js.map +0 -1
  145. package/bridging/finishReason.mjs +0 -8
  146. package/bridging/finishReason.mjs.map +0 -1
  147. package/bridging/grammarConfig.d.mts +0 -13
  148. package/bridging/grammarConfig.d.mts.map +0 -1
  149. package/bridging/grammarConfig.d.ts +0 -13
  150. package/bridging/grammarConfig.d.ts.map +0 -1
  151. package/bridging/grammarConfig.js +0 -36
  152. package/bridging/grammarConfig.js.map +0 -1
  153. package/bridging/grammarConfig.mjs +0 -31
  154. package/bridging/grammarConfig.mjs.map +0 -1
  155. package/bridging/input.d.mts +0 -11
  156. package/bridging/input.d.mts.map +0 -1
  157. package/bridging/input.d.ts +0 -11
  158. package/bridging/input.d.ts.map +0 -1
  159. package/bridging/input.js +0 -25
  160. package/bridging/input.js.map +0 -1
  161. package/bridging/input.mjs +0 -21
  162. package/bridging/input.mjs.map +0 -1
  163. package/bridging/licenseStatus.d.mts +0 -14
  164. package/bridging/licenseStatus.d.mts.map +0 -1
  165. package/bridging/licenseStatus.d.ts +0 -14
  166. package/bridging/licenseStatus.d.ts.map +0 -1
  167. package/bridging/licenseStatus.js +0 -42
  168. package/bridging/licenseStatus.js.map +0 -1
  169. package/bridging/licenseStatus.mjs +0 -38
  170. package/bridging/licenseStatus.mjs.map +0 -1
  171. package/bridging/message.d.mts +0 -15
  172. package/bridging/message.d.mts.map +0 -1
  173. package/bridging/message.d.ts +0 -15
  174. package/bridging/message.d.ts.map +0 -1
  175. package/bridging/message.js +0 -43
  176. package/bridging/message.js.map +0 -1
  177. package/bridging/message.mjs +0 -39
  178. package/bridging/message.mjs.map +0 -1
  179. package/bridging/model.d.mts +0 -19
  180. package/bridging/model.d.mts.map +0 -1
  181. package/bridging/model.d.ts +0 -19
  182. package/bridging/model.d.ts.map +0 -1
  183. package/bridging/model.js +0 -39
  184. package/bridging/model.js.map +0 -1
  185. package/bridging/model.mjs +0 -35
  186. package/bridging/model.mjs.map +0 -1
  187. package/bridging/modelKind.d.mts +0 -8
  188. package/bridging/modelKind.d.mts.map +0 -1
  189. package/bridging/modelKind.d.ts +0 -8
  190. package/bridging/modelKind.d.ts.map +0 -1
  191. package/bridging/modelKind.js +0 -30
  192. package/bridging/modelKind.js.map +0 -1
  193. package/bridging/modelKind.mjs +0 -25
  194. package/bridging/modelKind.mjs.map +0 -1
  195. package/bridging/modelType.d.mts +0 -9
  196. package/bridging/modelType.d.mts.map +0 -1
  197. package/bridging/modelType.d.ts +0 -9
  198. package/bridging/modelType.d.ts.map +0 -1
  199. package/bridging/modelType.js +0 -35
  200. package/bridging/modelType.js.map +0 -1
  201. package/bridging/modelType.mjs +0 -30
  202. package/bridging/modelType.mjs.map +0 -1
  203. package/bridging/napi.d.mts +0 -4
  204. package/bridging/napi.d.mts.map +0 -1
  205. package/bridging/napi.d.ts +0 -4
  206. package/bridging/napi.d.ts.map +0 -1
  207. package/bridging/napi.js +0 -3
  208. package/bridging/napi.js.map +0 -1
  209. package/bridging/napi.mjs +0 -2
  210. package/bridging/napi.mjs.map +0 -1
  211. package/bridging/output.d.mts +0 -13
  212. package/bridging/output.d.mts.map +0 -1
  213. package/bridging/output.d.ts +0 -13
  214. package/bridging/output.d.ts.map +0 -1
  215. package/bridging/output.js +0 -36
  216. package/bridging/output.js.map +0 -1
  217. package/bridging/output.mjs +0 -32
  218. package/bridging/output.mjs.map +0 -1
  219. package/bridging/parsedText.d.mts +0 -10
  220. package/bridging/parsedText.d.mts.map +0 -1
  221. package/bridging/parsedText.d.ts +0 -10
  222. package/bridging/parsedText.d.ts.map +0 -1
  223. package/bridging/parsedText.js +0 -24
  224. package/bridging/parsedText.js.map +0 -1
  225. package/bridging/parsedText.mjs +0 -20
  226. package/bridging/parsedText.mjs.map +0 -1
  227. package/bridging/prefillStepSize.d.mts +0 -11
  228. package/bridging/prefillStepSize.d.mts.map +0 -1
  229. package/bridging/prefillStepSize.d.ts +0 -11
  230. package/bridging/prefillStepSize.d.ts.map +0 -1
  231. package/bridging/prefillStepSize.js +0 -28
  232. package/bridging/prefillStepSize.js.map +0 -1
  233. package/bridging/prefillStepSize.mjs +0 -24
  234. package/bridging/prefillStepSize.mjs.map +0 -1
  235. package/bridging/preset.d.mts +0 -14
  236. package/bridging/preset.d.mts.map +0 -1
  237. package/bridging/preset.d.ts +0 -14
  238. package/bridging/preset.d.ts.map +0 -1
  239. package/bridging/preset.js +0 -41
  240. package/bridging/preset.js.map +0 -1
  241. package/bridging/preset.mjs +0 -37
  242. package/bridging/preset.mjs.map +0 -1
  243. package/bridging/role.d.mts +0 -6
  244. package/bridging/role.d.mts.map +0 -1
  245. package/bridging/role.d.ts +0 -6
  246. package/bridging/role.d.ts.map +0 -1
  247. package/bridging/role.js +0 -10
  248. package/bridging/role.js.map +0 -1
  249. package/bridging/role.mjs +0 -7
  250. package/bridging/role.mjs.map +0 -1
  251. package/bridging/runConfig.d.mts +0 -18
  252. package/bridging/runConfig.d.mts.map +0 -1
  253. package/bridging/runConfig.d.ts +0 -18
  254. package/bridging/runConfig.d.ts.map +0 -1
  255. package/bridging/runConfig.js +0 -42
  256. package/bridging/runConfig.js.map +0 -1
  257. package/bridging/runConfig.mjs +0 -38
  258. package/bridging/runConfig.mjs.map +0 -1
  259. package/bridging/runStats.d.mts +0 -8
  260. package/bridging/runStats.d.mts.map +0 -1
  261. package/bridging/runStats.d.ts +0 -8
  262. package/bridging/runStats.d.ts.map +0 -1
  263. package/bridging/runStats.js +0 -16
  264. package/bridging/runStats.js.map +0 -1
  265. package/bridging/runStats.mjs +0 -12
  266. package/bridging/runStats.mjs.map +0 -1
  267. package/bridging/samplingMethod.d.mts +0 -11
  268. package/bridging/samplingMethod.d.mts.map +0 -1
  269. package/bridging/samplingMethod.d.ts +0 -11
  270. package/bridging/samplingMethod.d.ts.map +0 -1
  271. package/bridging/samplingMethod.js +0 -37
  272. package/bridging/samplingMethod.js.map +0 -1
  273. package/bridging/samplingMethod.mjs +0 -33
  274. package/bridging/samplingMethod.mjs.map +0 -1
  275. package/bridging/samplingPolicy.d.mts +0 -11
  276. package/bridging/samplingPolicy.d.mts.map +0 -1
  277. package/bridging/samplingPolicy.d.ts +0 -11
  278. package/bridging/samplingPolicy.d.ts.map +0 -1
  279. package/bridging/samplingPolicy.js +0 -25
  280. package/bridging/samplingPolicy.js.map +0 -1
  281. package/bridging/samplingPolicy.mjs +0 -21
  282. package/bridging/samplingPolicy.mjs.map +0 -1
  283. package/bridging/samplingProcessingOrder.d.mts +0 -8
  284. package/bridging/samplingProcessingOrder.d.mts.map +0 -1
  285. package/bridging/samplingProcessingOrder.d.ts +0 -8
  286. package/bridging/samplingProcessingOrder.d.ts.map +0 -1
  287. package/bridging/samplingProcessingOrder.js +0 -30
  288. package/bridging/samplingProcessingOrder.js.map +0 -1
  289. package/bridging/samplingProcessingOrder.mjs +0 -25
  290. package/bridging/samplingProcessingOrder.mjs.map +0 -1
  291. package/bridging/samplingSeed.d.mts +0 -10
  292. package/bridging/samplingSeed.d.mts.map +0 -1
  293. package/bridging/samplingSeed.d.ts +0 -10
  294. package/bridging/samplingSeed.d.ts.map +0 -1
  295. package/bridging/samplingSeed.js +0 -21
  296. package/bridging/samplingSeed.js.map +0 -1
  297. package/bridging/samplingSeed.mjs +0 -17
  298. package/bridging/samplingSeed.mjs.map +0 -1
  299. package/bridging/stats.d.mts +0 -11
  300. package/bridging/stats.d.mts.map +0 -1
  301. package/bridging/stats.d.ts +0 -11
  302. package/bridging/stats.d.ts.map +0 -1
  303. package/bridging/stats.js +0 -20
  304. package/bridging/stats.js.map +0 -1
  305. package/bridging/stats.mjs +0 -16
  306. package/bridging/stats.mjs.map +0 -1
  307. package/bridging/stepStats.d.mts +0 -14
  308. package/bridging/stepStats.d.mts.map +0 -1
  309. package/bridging/stepStats.d.ts +0 -14
  310. package/bridging/stepStats.d.ts.map +0 -1
  311. package/bridging/stepStats.js +0 -27
  312. package/bridging/stepStats.js.map +0 -1
  313. package/bridging/stepStats.mjs +0 -23
  314. package/bridging/stepStats.mjs.map +0 -1
  315. package/bridging/text.d.mts +0 -9
  316. package/bridging/text.d.mts.map +0 -1
  317. package/bridging/text.d.ts +0 -9
  318. package/bridging/text.d.ts.map +0 -1
  319. package/bridging/text.js +0 -17
  320. package/bridging/text.js.map +0 -1
  321. package/bridging/text.mjs +0 -13
  322. package/bridging/text.mjs.map +0 -1
  323. package/bridging/textToSpeechSession.d.mts +0 -8
  324. package/bridging/textToSpeechSession.d.mts.map +0 -1
  325. package/bridging/textToSpeechSession.d.ts +0 -8
  326. package/bridging/textToSpeechSession.d.ts.map +0 -1
  327. package/bridging/textToSpeechSession.js +0 -14
  328. package/bridging/textToSpeechSession.js.map +0 -1
  329. package/bridging/textToSpeechSession.mjs +0 -10
  330. package/bridging/textToSpeechSession.mjs.map +0 -1
  331. package/bridging/totalStats.d.mts +0 -9
  332. package/bridging/totalStats.d.mts.map +0 -1
  333. package/bridging/totalStats.d.ts +0 -9
  334. package/bridging/totalStats.d.ts.map +0 -1
  335. package/bridging/totalStats.js +0 -18
  336. package/bridging/totalStats.js.map +0 -1
  337. package/bridging/totalStats.mjs +0 -14
  338. package/bridging/totalStats.mjs.map +0 -1
  339. package/error.d.mts +0 -18
  340. package/error.d.mts.map +0 -1
  341. package/error.d.ts +0 -18
  342. package/error.d.ts.map +0 -1
  343. package/error.js +0 -46
  344. package/error.js.map +0 -1
  345. package/error.mjs +0 -41
  346. package/error.mjs.map +0 -1
  347. package/interactors/chatModelInteractor.d.mts +0 -34
  348. package/interactors/chatModelInteractor.d.mts.map +0 -1
  349. package/interactors/chatModelInteractor.d.ts +0 -34
  350. package/interactors/chatModelInteractor.d.ts.map +0 -1
  351. package/interactors/chatModelInteractor.js +0 -93
  352. package/interactors/chatModelInteractor.js.map +0 -1
  353. package/interactors/chatModelInteractor.mjs +0 -89
  354. package/interactors/chatModelInteractor.mjs.map +0 -1
  355. package/interactors/chatModelsInteractor.d.mts +0 -12
  356. package/interactors/chatModelsInteractor.d.mts.map +0 -1
  357. package/interactors/chatModelsInteractor.d.ts +0 -12
  358. package/interactors/chatModelsInteractor.d.ts.map +0 -1
  359. package/interactors/chatModelsInteractor.js +0 -25
  360. package/interactors/chatModelsInteractor.js.map +0 -1
  361. package/interactors/chatModelsInteractor.mjs +0 -21
  362. package/interactors/chatModelsInteractor.mjs.map +0 -1
  363. package/interactors/chatSessionInteractor.d.mts +0 -26
  364. package/interactors/chatSessionInteractor.d.mts.map +0 -1
  365. package/interactors/chatSessionInteractor.d.ts +0 -26
  366. package/interactors/chatSessionInteractor.d.ts.map +0 -1
  367. package/interactors/chatSessionInteractor.js +0 -54
  368. package/interactors/chatSessionInteractor.js.map +0 -1
  369. package/interactors/chatSessionInteractor.mjs +0 -50
  370. package/interactors/chatSessionInteractor.mjs.map +0 -1
  371. package/interactors/downloadInteractor.d.mts +0 -16
  372. package/interactors/downloadInteractor.d.mts.map +0 -1
  373. package/interactors/downloadInteractor.d.ts +0 -16
  374. package/interactors/downloadInteractor.d.ts.map +0 -1
  375. package/interactors/downloadInteractor.js +0 -38
  376. package/interactors/downloadInteractor.js.map +0 -1
  377. package/interactors/downloadInteractor.mjs +0 -34
  378. package/interactors/downloadInteractor.mjs.map +0 -1
  379. package/interactors/engineInteractor.d.mts +0 -15
  380. package/interactors/engineInteractor.d.mts.map +0 -1
  381. package/interactors/engineInteractor.d.ts +0 -15
  382. package/interactors/engineInteractor.d.ts.map +0 -1
  383. package/interactors/engineInteractor.js +0 -30
  384. package/interactors/engineInteractor.js.map +0 -1
  385. package/interactors/engineInteractor.mjs +0 -26
  386. package/interactors/engineInteractor.mjs.map +0 -1
  387. package/interactors/interactor.d.mts +0 -6
  388. package/interactors/interactor.d.mts.map +0 -1
  389. package/interactors/interactor.d.ts +0 -6
  390. package/interactors/interactor.d.ts.map +0 -1
  391. package/interactors/interactor.js +0 -3
  392. package/interactors/interactor.js.map +0 -1
  393. package/interactors/interactor.mjs +0 -2
  394. package/interactors/interactor.mjs.map +0 -1
  395. package/napi/uzu.d.ts +0 -325
  396. package/napi/uzu.js +0 -121
  397. package/napi/uzu.mjs +0 -74
  398. package/src/bridging/asyncBatchSize.ts +0 -24
  399. package/src/bridging/chatSession.ts +0 -28
  400. package/src/bridging/classificationFeature.ts +0 -20
  401. package/src/bridging/classificationLabel.ts +0 -43
  402. package/src/bridging/classificationOutput.ts +0 -22
  403. package/src/bridging/classificationSession.ts +0 -17
  404. package/src/bridging/classificationStats.ts +0 -45
  405. package/src/bridging/config.ts +0 -122
  406. package/src/bridging/contextLength.ts +0 -29
  407. package/src/bridging/contextMode.ts +0 -31
  408. package/src/bridging/downloadHandle.ts +0 -41
  409. package/src/bridging/downloadProgressUpdate.ts +0 -21
  410. package/src/bridging/downloadState.ts +0 -62
  411. package/src/bridging/engine.ts +0 -141
  412. package/src/bridging/finishReason.ts +0 -6
  413. package/src/bridging/grammarConfig.ts +0 -40
  414. package/src/bridging/input.ts +0 -29
  415. package/src/bridging/licenseStatus.ts +0 -39
  416. package/src/bridging/message.ts +0 -50
  417. package/src/bridging/model.ts +0 -68
  418. package/src/bridging/modelKind.ts +0 -27
  419. package/src/bridging/modelType.ts +0 -32
  420. package/src/bridging/napi.ts +0 -3
  421. package/src/bridging/output.ts +0 -40
  422. package/src/bridging/parsedText.ts +0 -27
  423. package/src/bridging/prefillStepSize.ts +0 -32
  424. package/src/bridging/preset.ts +0 -48
  425. package/src/bridging/role.ts +0 -5
  426. package/src/bridging/runConfig.ts +0 -57
  427. package/src/bridging/runStats.ts +0 -17
  428. package/src/bridging/samplingMethod.ts +0 -49
  429. package/src/bridging/samplingPolicy.ts +0 -29
  430. package/src/bridging/samplingProcessingOrder.ts +0 -31
  431. package/src/bridging/samplingSeed.ts +0 -24
  432. package/src/bridging/stats.ts +0 -22
  433. package/src/bridging/stepStats.ts +0 -49
  434. package/src/bridging/text.ts +0 -18
  435. package/src/bridging/textToSpeechSession.ts +0 -15
  436. package/src/bridging/totalStats.ts +0 -20
  437. package/src/error.ts +0 -42
  438. package/src/interactors/chatModelInteractor.ts +0 -126
  439. package/src/interactors/chatModelsInteractor.ts +0 -29
  440. package/src/interactors/chatSessionInteractor.ts +0 -80
  441. package/src/interactors/downloadInteractor.ts +0 -47
  442. package/src/interactors/engineInteractor.ts +0 -38
  443. package/src/interactors/interactor.ts +0 -7
  444. package/src/napi/uzu.d.ts +0 -325
  445. package/src/napi/uzu.js +0 -121
  446. package/src/napi/uzu.mjs +0 -74
  447. package/src/utilities/env.ts +0 -9
  448. package/utilities/env.d.mts +0 -2
  449. package/utilities/env.d.mts.map +0 -1
  450. package/utilities/env.d.ts +0 -2
  451. package/utilities/env.d.ts.map +0 -1
  452. package/utilities/env.js +0 -14
  453. package/utilities/env.js.map +0 -1
  454. package/utilities/env.mjs +0 -10
  455. package/utilities/env.mjs.map +0 -1
@@ -0,0 +1,975 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare class ChatSession {
4
+ get state(): Promise<ChatSessionState>
5
+ get messages(): Promise<Array<ChatMessage>>
6
+ reset(): Promise<void>
7
+ reply(input: Array<ChatMessage>, config: ChatReplyConfig): Promise<Array<ChatReply>>
8
+ replyWithStream(input: Array<ChatMessage>, config: ChatReplyConfig): Promise<ChatSessionStream>
9
+ }
10
+
11
+ /**
12
+ * This type implements JavaScript's async iterable protocol.
13
+ * It can be used with `for await...of` loops.
14
+ *
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
16
+ */
17
+ export declare class ChatSessionStream {
18
+ next(): Promise<ChatSessionStreamChunk | null>
19
+ get cancelToken(): CancelToken
20
+ [Symbol.asyncIterator](): AsyncGenerator<ChatSessionStreamChunk, void, undefined>
21
+ }
22
+
23
+ export declare class ChatSessionStreamChunkError {
24
+ error: ChatSessionError
25
+ constructor(error: ChatSessionError)
26
+ }
27
+
28
+ export declare class ChatSessionStreamChunkReplies {
29
+ replies: Array<ChatReply>
30
+ constructor(replies: Array<ChatReply>)
31
+ }
32
+
33
+ export declare class ClassificationSession {
34
+ get state(): Promise<ClassificationSessionState>
35
+ classify(input: Array<ClassificationMessage>): Promise<ClassificationOutput>
36
+ }
37
+
38
+ export declare class TextToSpeechSession {
39
+ get state(): Promise<TextToSpeechSessionState>
40
+ synthesize(input: string): Promise<PcmBatch>
41
+ synthesizeStream(input: string): Promise<TextToSpeechSessionStream>
42
+ }
43
+
44
+ /**
45
+ * This type implements JavaScript's async iterable protocol.
46
+ * It can be used with `for await...of` loops.
47
+ *
48
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
49
+ */
50
+ export declare class TextToSpeechSessionStream {
51
+ next(): Promise<TextToSpeechSessionStreamChunk | null>
52
+ get cancelToken(): CancelToken
53
+ [Symbol.asyncIterator](): AsyncGenerator<TextToSpeechSessionStreamChunk, void, undefined>
54
+ }
55
+
56
+ export declare class TextToSpeechSessionStreamChunkError {
57
+ error: TextToSpeechSessionError
58
+ constructor(error: TextToSpeechSessionError)
59
+ }
60
+
61
+ export declare class TextToSpeechSessionStreamChunkPcmBatch {
62
+ batch: PcmBatch
63
+ constructor(batch: PcmBatch)
64
+ }
65
+
66
+ export type ChatSessionError =
67
+ | { type: 'Backend', message: string }
68
+ | { type: 'UnsupportedModel' }
69
+ | { type: 'UnableToPerformOperationInCurrentState' }
70
+ | { type: 'NoResponse' }
71
+
72
+ export declare const enum ChatSessionState {
73
+ Idle = 'Idle',
74
+ Generation = 'Generation',
75
+ ToolCalling = 'ToolCalling',
76
+ Resetting = 'Resetting'
77
+ }
78
+
79
+ export type ChatSessionStreamChunk =
80
+ ChatSessionStreamChunkReplies | ChatSessionStreamChunkError
81
+
82
+ export type ClassificationSessionError =
83
+ | { type: 'Backend', message: string }
84
+ | { type: 'UnsupportedModel' }
85
+ | { type: 'UnableToPerformOperationInCurrentState' }
86
+ | { type: 'NoResponse' }
87
+
88
+ export declare const enum ClassificationSessionState {
89
+ Idle = 'Idle',
90
+ Classifying = 'Classifying'
91
+ }
92
+
93
+ export type TextToSpeechSessionError =
94
+ | { type: 'Backend', message: string }
95
+ | { type: 'UnsupportedModel' }
96
+ | { type: 'UnableToPerformOperationInCurrentState' }
97
+ | { type: 'NoResponse' }
98
+
99
+ export declare const enum TextToSpeechSessionState {
100
+ Idle = 'Idle',
101
+ Synthesizing = 'Synthesizing'
102
+ }
103
+
104
+ export type TextToSpeechSessionStreamChunk =
105
+ TextToSpeechSessionStreamChunkPcmBatch | TextToSpeechSessionStreamChunkError
106
+ export declare class CancelToken {
107
+ cancel(): void
108
+ get isCancelled(): boolean
109
+ static create(): CancelToken
110
+ }
111
+
112
+ export declare class ChatConfig {
113
+ contextLength: ContextLength
114
+ samplingSeed: SamplingSeed
115
+ speculationPreset?: ChatSpeculationPreset
116
+ constructor(contextLength: ContextLength, samplingSeed: SamplingSeed, speculationPreset?: ChatSpeculationPreset)
117
+
118
+ static create(): ChatConfig
119
+ withContextLength(contextLength: ContextLength): ChatConfig
120
+ withSamplingSeed(samplingSeed: SamplingSeed): ChatConfig
121
+ withSpeculationPreset(speculationPreset?: ChatSpeculationPreset | undefined | null): ChatConfig
122
+ }
123
+
124
+ export declare class ChatContentBlockAudio {
125
+ url: string
126
+ constructor(url: string)
127
+ }
128
+
129
+ export declare class ChatContentBlockBuiltinTools {
130
+ names: Array<string>
131
+ constructor(names: Array<string>)
132
+ }
133
+
134
+ export declare class ChatContentBlockConversationStartDate {
135
+ value: string
136
+ constructor(value: string)
137
+ }
138
+
139
+ export declare class ChatContentBlockCustom {
140
+ value: any
141
+ constructor(value: any)
142
+ }
143
+
144
+ export declare class ChatContentBlockFile {
145
+ url: string
146
+ constructor(url: string)
147
+ }
148
+
149
+ export declare class ChatContentBlockIdentity {
150
+ value: string
151
+ constructor(value: string)
152
+ }
153
+
154
+ export declare class ChatContentBlockImage {
155
+ url: string
156
+ constructor(url: string)
157
+ }
158
+
159
+ export declare class ChatContentBlockKnowledgeCutoff {
160
+ value: string
161
+ constructor(value: string)
162
+ }
163
+
164
+ export declare class ChatContentBlockReasoning {
165
+ value: string
166
+ constructor(value: string)
167
+ }
168
+
169
+ export declare class ChatContentBlockReasoningEffort {
170
+ value: ReasoningEffort
171
+ constructor(value: ReasoningEffort)
172
+ }
173
+
174
+ export declare class ChatContentBlockText {
175
+ value: string
176
+ constructor(value: string)
177
+ }
178
+
179
+ export declare class ChatContentBlockToolCall {
180
+ value: ToolCall
181
+ constructor(value: ToolCall)
182
+ }
183
+
184
+ export declare class ChatContentBlockToolCallCandidate {
185
+ value: any
186
+ constructor(value: any)
187
+ }
188
+
189
+ export declare class ChatContentBlockToolCallResult {
190
+ identifier?: string
191
+ name?: string
192
+ value: any
193
+ constructor(identifier?: string, name?: string, value: any)
194
+ }
195
+
196
+ export declare class ChatContentBlockTools {
197
+ namespaces: Array<ToolNamespace>
198
+ constructor(namespaces: Array<ToolNamespace>)
199
+ }
200
+
201
+ export declare class ChatContentBlockTranslation {
202
+ payload: TranslationPayload
203
+ sourceLanguageCode: string
204
+ targetLanguageCode: string
205
+ constructor(payload: TranslationPayload, sourceLanguageCode: string, targetLanguageCode: string)
206
+ }
207
+
208
+ export declare class ChatContentBlockVideo {
209
+ url: string
210
+ constructor(url: string)
211
+ }
212
+
213
+ export declare class ChatMessage {
214
+ role: ChatRole
215
+ content: Array<ChatContentBlock>
216
+ metadata: ChatMessageMetadata
217
+ constructor(role: ChatRole, content: Array<ChatContentBlock>, metadata: ChatMessageMetadata)
218
+
219
+ static for_role(role: ChatRole): ChatMessage
220
+ static system(): ChatMessage
221
+ static developer(): ChatMessage
222
+ static user(): ChatMessage
223
+ static assistant(): ChatMessage
224
+ static tool(): ChatMessage
225
+ withBlock(block: ChatContentBlock): ChatMessage
226
+ withReasoningEffort(reasoningEffort: ReasoningEffort): ChatMessage
227
+ withToolNamespaces(toolNamespaces: Array<ToolNamespace>): ChatMessage
228
+ withText(text: string): ChatMessage
229
+ withReasoning(reasoning: string): ChatMessage
230
+ withToolCall(toolCall: ToolCall): ChatMessage
231
+ withToolCallCandidate(value: any): ChatMessage
232
+ get reasoningEffort(): ReasoningEffort | null
233
+ get text(): string | null
234
+ get reasoning(): string | null
235
+ get toolNamespaces(): Array<ToolNamespace>
236
+ get toolCalls(): Array<ToolCall>
237
+ }
238
+
239
+ export declare class ChatModelCapabilities {
240
+ supportsReasoning: boolean
241
+ supportsDisableReasoning: boolean
242
+ supportsTools: boolean
243
+ supportsMultipleToolCalls: boolean
244
+ requiresTools: boolean
245
+ constructor(supportsReasoning: boolean, supportsDisableReasoning: boolean, supportsTools: boolean, supportsMultipleToolCalls: boolean, requiresTools: boolean)
246
+ }
247
+
248
+ export declare class ChatReply {
249
+ message: ChatMessage
250
+ stats: ChatReplyStats
251
+ finishReason?: ChatReplyFinishReason
252
+ constructor(message: ChatMessage, stats: ChatReplyStats, finishReason?: ChatReplyFinishReason)
253
+ }
254
+
255
+ export declare class ChatReplyConfig {
256
+ tokenLimit?: number
257
+ samplingPolicy: SamplingPolicy
258
+ grammar?: Grammar
259
+ constructor(tokenLimit?: number, samplingPolicy: SamplingPolicy, grammar?: Grammar)
260
+
261
+ static create(): ChatReplyConfig
262
+ withTokenLimit(tokenLimit?: number | undefined | null): ChatReplyConfig
263
+ withSamplingPolicy(samplingPolicy: SamplingPolicy): ChatReplyConfig
264
+ withSamplingMethod(samplingMethod: SamplingMethod): ChatReplyConfig
265
+ withGrammar(grammar?: Grammar | undefined | null): ChatReplyConfig
266
+ }
267
+
268
+ export declare class ChatReplyStats {
269
+ duration: number
270
+ timeToFirstToken?: number
271
+ prefillTokensPerSecond?: number
272
+ generateTokensPerSecond?: number
273
+ tokensCountInput?: number
274
+ tokensCountOutput?: number
275
+ constructor(duration: number, timeToFirstToken?: number, prefillTokensPerSecond?: number, generateTokensPerSecond?: number, tokensCountInput?: number, tokensCountOutput?: number)
276
+ get tokensCount(): number | null
277
+ }
278
+
279
+ export declare class ChatRoleAssistant {
280
+
281
+ constructor()
282
+ }
283
+
284
+ export declare class ChatRoleCustom {
285
+ name: string
286
+ constructor(name: string)
287
+ }
288
+
289
+ export declare class ChatRoleDeveloper {
290
+
291
+ constructor()
292
+ }
293
+
294
+ export declare class ChatRoleSystem {
295
+
296
+ constructor()
297
+ }
298
+
299
+ export declare class ChatRoleTool {
300
+
301
+ constructor()
302
+ }
303
+
304
+ export declare class ChatRoleUser {
305
+
306
+ constructor()
307
+ }
308
+
309
+ export declare class ChatSpeculationPresetClassification {
310
+ feature: Feature
311
+ constructor(feature: Feature)
312
+ }
313
+
314
+ export declare class ChatSpeculationPresetGeneralChat {
315
+
316
+ constructor()
317
+ }
318
+
319
+ export declare class ChatSpeculationPresetSummarization {
320
+
321
+ constructor()
322
+ }
323
+
324
+ export declare class ClassificationLabel {
325
+ index: number
326
+ label: string
327
+ title: string
328
+ description: string
329
+ recommendedThreshold: number
330
+ constructor(index: number, label: string, title: string, description: string, recommendedThreshold: number)
331
+ }
332
+
333
+ export declare class ClassificationMessage {
334
+ role: ClassificationRole
335
+ content: string
336
+ constructor(role: ClassificationRole, content: string)
337
+
338
+ static user(content: string): ClassificationMessage
339
+ static assistant(content: string): ClassificationMessage
340
+ }
341
+
342
+ export declare class ClassificationOutput {
343
+ logits: Array<number>
344
+ probabilities: ClassificationOutputProbabilities
345
+ stats: ClassificationStats
346
+ constructor(logits: Array<number>, probabilities: ClassificationOutputProbabilities, stats: ClassificationStats)
347
+ }
348
+
349
+ export declare class ClassificationStats {
350
+ preprocessingDuration: number
351
+ forwardPassDuration: number
352
+ postprocessingDuration: number
353
+ totalDuration: number
354
+ tokensCount: number
355
+ tokensPerSecond: number
356
+ predictedLabel: string
357
+ confidence: number
358
+ constructor(preprocessingDuration: number, forwardPassDuration: number, postprocessingDuration: number, totalDuration: number, tokensCount: number, tokensPerSecond: number, predictedLabel: string, confidence: number)
359
+ }
360
+
361
+ export declare class ContextLengthCustom {
362
+ length: number
363
+ constructor(length: number)
364
+ }
365
+
366
+ export declare class ContextLengthDefault {
367
+
368
+ constructor()
369
+ }
370
+
371
+ export declare class ContextLengthMaximal {
372
+
373
+ constructor()
374
+ }
375
+
376
+ export declare class Feature {
377
+ name: string
378
+ values: Array<string>
379
+ constructor(name: string, values: Array<string>)
380
+ }
381
+
382
+ export declare class File {
383
+ url: string
384
+ name: string
385
+ size: number
386
+ hashes: Array<Hash>
387
+ constructor(url: string, name: string, size: number, hashes: Array<Hash>)
388
+ get crc32C(): string | null
389
+ get md5(): string | null
390
+ }
391
+
392
+ export declare class GrammarJsonAny {
393
+
394
+ constructor()
395
+ }
396
+
397
+ export declare class GrammarJsonSchema {
398
+ schema: string
399
+ constructor(schema: string)
400
+ }
401
+
402
+ export declare class GrammarRegex {
403
+ pattern: string
404
+ constructor(pattern: string)
405
+ }
406
+
407
+ export declare class Hash {
408
+ method: HashMethod
409
+ value: string
410
+ constructor(method: HashMethod, value: string)
411
+ }
412
+
413
+ export declare class Image {
414
+ id: string
415
+ url: string
416
+ theme: ImageTheme
417
+ format: ImageFormat
418
+ description?: string
419
+ width?: number
420
+ height?: number
421
+ constructor(id: string, url: string, theme: ImageTheme, format: ImageFormat, description?: string, width?: number, height?: number)
422
+ }
423
+
424
+ export declare class Metadata {
425
+ identifier: string
426
+ name: string
427
+ description?: string
428
+ icons: Array<Image>
429
+ constructor(identifier: string, name: string, description?: string, icons: Array<Image>)
430
+
431
+ static external(name: string): Metadata
432
+ }
433
+
434
+ export declare class Model {
435
+ identifier: string
436
+ registry: ModelRegistry
437
+ backends: Array<ModelBackend>
438
+ family?: ModelFamily
439
+ properties?: ModelProperties
440
+ quantization?: ModelQuantization
441
+ specializations: Array<ModelSpecialization>
442
+ accessibility: ModelAccessibility
443
+ constructor(identifier: string, registry: ModelRegistry, backends: Array<ModelBackend>, family?: ModelFamily, properties?: ModelProperties, quantization?: ModelQuantization, specializations: Array<ModelSpecialization>, accessibility: ModelAccessibility)
444
+ get name(): string
445
+ get isLocal(): boolean
446
+ get isRemote(): boolean
447
+ get isDownloadable(): boolean
448
+ get isQuantized(): boolean
449
+ get cacheIdentifier(): string
450
+ get repoIds(): Array<string>
451
+ get localExternalPath(): string | null
452
+ get referenceName(): string | null
453
+ get checkpointVersion(): string | null
454
+
455
+ static external(identifier: string, registryIdentifier: string, registryName: string, backendIdentifier: string, backendName: string, backendVersion: string, specializations: Array<ModelSpecialization>, accessibility: ModelAccessibility): Model
456
+ get isChatCapable(): boolean
457
+ get isClassificationCapable(): boolean
458
+ get isTextToSpeechCapable(): boolean
459
+ get isTranslationCapable(): boolean
460
+ get isSpeculationCapable(): boolean
461
+ }
462
+
463
+ export declare class ModelAccessibilityLocal {
464
+ reference: ModelReference
465
+ constructor(reference: ModelReference)
466
+ }
467
+
468
+ export declare class ModelAccessibilityRemote {
469
+ repository?: Repository
470
+ constructor(repository?: Repository)
471
+ }
472
+
473
+ export declare class ModelBackend {
474
+ identifier: string
475
+ version: string
476
+ metadata: Metadata
477
+ constructor(identifier: string, version: string, metadata: Metadata)
478
+ get name(): string
479
+ }
480
+
481
+ export declare class ModelFamily {
482
+ identifier: string
483
+ vendor: ModelVendor
484
+ metadata: Metadata
485
+ constructor(identifier: string, vendor: ModelVendor, metadata: Metadata)
486
+ get name(): string
487
+ }
488
+
489
+ export declare class ModelProperties {
490
+ identifier: string
491
+ size: number
492
+ version?: string
493
+ metadata: Metadata
494
+ constructor(identifier: string, size: number, version?: string, metadata: Metadata)
495
+ get name(): string
496
+ }
497
+
498
+ export declare class ModelQuantization {
499
+ identifier: string
500
+ method: string
501
+ bitsPerWeight: number
502
+ vendor: ModelVendor
503
+ metadata: Metadata
504
+ constructor(identifier: string, method: string, bitsPerWeight: number, vendor: ModelVendor, metadata: Metadata)
505
+ get name(): string
506
+ }
507
+
508
+ export declare class ModelReferenceHuggingFace {
509
+ repository: Repository
510
+ constructor(repository: Repository)
511
+ }
512
+
513
+ export declare class ModelReferenceLocal {
514
+ path: string
515
+ constructor(path: string)
516
+ }
517
+
518
+ export declare class ModelReferenceMirai {
519
+ toolchainVersion: string
520
+ repository?: Repository
521
+ sourceRepository?: Repository
522
+ files: Array<File>
523
+ constructor(toolchainVersion: string, repository?: Repository, sourceRepository?: Repository, files: Array<File>)
524
+ }
525
+
526
+ export declare class ModelRegistry {
527
+ identifier: string
528
+ metadata: Metadata
529
+ constructor(identifier: string, metadata: Metadata)
530
+ get name(): string
531
+ }
532
+
533
+ export declare class ModelSpecializationChat {
534
+
535
+ constructor()
536
+ }
537
+
538
+ export declare class ModelSpecializationClassification {
539
+
540
+ constructor()
541
+ }
542
+
543
+ export declare class ModelSpecializationSpeculation {
544
+
545
+ constructor()
546
+ }
547
+
548
+ export declare class ModelSpecializationTextToSpeech {
549
+
550
+ constructor()
551
+ }
552
+
553
+ export declare class ModelSpecializationTranslation {
554
+
555
+ constructor()
556
+ }
557
+
558
+ export declare class ModelVendor {
559
+ identifier: string
560
+ metadata: Metadata
561
+ constructor(identifier: string, metadata: Metadata)
562
+ get name(): string
563
+ }
564
+
565
+ export declare class PcmBatch {
566
+ samples: Array<number>
567
+ sampleRate: number
568
+ channels: number
569
+ lengths: Array<number>
570
+ constructor(samples: Array<number>, sampleRate: number, channels: number, lengths: Array<number>)
571
+ get batchSize(): number
572
+ get totalFrames(): number
573
+ saveAsWav(path: string): void
574
+ }
575
+
576
+ export declare class Repository {
577
+ identifier: string
578
+ commitHash?: string
579
+ paths?: Array<string>
580
+ constructor(identifier: string, commitHash?: string, paths?: Array<string>)
581
+ }
582
+
583
+ export declare class SamplingMethodGreedy {
584
+
585
+ constructor()
586
+ }
587
+
588
+ export declare class SamplingMethodStochastic {
589
+ temperature?: number
590
+ topK?: number
591
+ topP?: number
592
+ minP?: number
593
+ constructor(temperature?: number, topK?: number, topP?: number, minP?: number)
594
+ }
595
+
596
+ export declare class SamplingPolicyCustom {
597
+ method: SamplingMethod
598
+ constructor(method: SamplingMethod)
599
+ }
600
+
601
+ export declare class SamplingPolicyDefault {
602
+
603
+ constructor()
604
+ }
605
+
606
+ export declare class SamplingSeedCustom {
607
+ seed: number
608
+ constructor(seed: number)
609
+ }
610
+
611
+ export declare class SamplingSeedDefault {
612
+
613
+ constructor()
614
+ }
615
+
616
+ export declare class TextToSpeechStats {
617
+ textLength: number
618
+ firstChunkSeconds: number
619
+ generationDuration: number
620
+ audioDuration: number
621
+ constructor(textLength: number, firstChunkSeconds: number, generationDuration: number, audioDuration: number)
622
+ }
623
+
624
+ export declare class Token {
625
+ id: TokenId
626
+ value: TokenValue
627
+ isSpecial: boolean
628
+ constructor(id: TokenId, value: TokenValue, isSpecial: boolean)
629
+ }
630
+
631
+ export declare class ToolCall {
632
+ identifier?: string
633
+ name: string
634
+ arguments: any
635
+ constructor(identifier?: string, name: string, arguments: any)
636
+ }
637
+
638
+ export declare class ToolDescriptionFunction {
639
+ toolFunction: ToolFunction
640
+ constructor(toolFunction: ToolFunction)
641
+ }
642
+
643
+ export declare class ToolFunction {
644
+ name: string
645
+ description: string
646
+ parameters?: any
647
+ returnDefinition?: any
648
+ constructor(name: string, description: string, parameters?: any, returnDefinition?: any)
649
+ }
650
+
651
+ export declare class ToolNamespace {
652
+ name: string
653
+ description?: string
654
+ tools: Array<ToolDescription>
655
+ constructor(name: string, description?: string, tools: Array<ToolDescription>)
656
+ }
657
+
658
+ export declare class TranslationPayloadImage {
659
+ url: string
660
+ constructor(url: string)
661
+ }
662
+
663
+ export declare class TranslationPayloadText {
664
+ text: string
665
+ constructor(text: string)
666
+ }
667
+
668
+ export declare class Value {
669
+ json: string
670
+ constructor(json: string)
671
+ }
672
+
673
+ export type ChatContentBlock =
674
+ ChatContentBlockIdentity | ChatContentBlockReasoningEffort | ChatContentBlockConversationStartDate | ChatContentBlockKnowledgeCutoff | ChatContentBlockBuiltinTools | ChatContentBlockTools | ChatContentBlockText | ChatContentBlockImage | ChatContentBlockVideo | ChatContentBlockAudio | ChatContentBlockFile | ChatContentBlockReasoning | ChatContentBlockToolCall | ChatContentBlockToolCallCandidate | ChatContentBlockToolCallResult | ChatContentBlockTranslation | ChatContentBlockCustom
675
+
676
+ export declare const enum ChatContentBlockType {
677
+ Identity = 'Identity',
678
+ ReasoningEffort = 'ReasoningEffort',
679
+ ConversationStartDate = 'ConversationStartDate',
680
+ KnowledgeCutoff = 'KnowledgeCutoff',
681
+ BuiltinTools = 'BuiltinTools',
682
+ Tools = 'Tools',
683
+ Text = 'Text',
684
+ Image = 'Image',
685
+ Video = 'Video',
686
+ Audio = 'Audio',
687
+ File = 'File',
688
+ Reasoning = 'Reasoning',
689
+ ToolCall = 'ToolCall',
690
+ ToolCallCandidate = 'ToolCallCandidate',
691
+ ToolCallResult = 'ToolCallResult',
692
+ Translation = 'Translation',
693
+ Custom = 'Custom'
694
+ }
695
+
696
+ export interface ChatMessageMetadata {
697
+ values: Record<string, any>
698
+ }
699
+
700
+ export declare const enum ChatReplyFinishReason {
701
+ Stop = 'Stop',
702
+ Length = 'Length',
703
+ Cancelled = 'Cancelled',
704
+ ContextLimitReached = 'ContextLimitReached',
705
+ ToolCalls = 'ToolCalls',
706
+ Rejected = 'Rejected'
707
+ }
708
+
709
+ export type ChatRole =
710
+ ChatRoleUser | ChatRoleAssistant | ChatRoleSystem | ChatRoleDeveloper | ChatRoleTool | ChatRoleCustom
711
+
712
+ export type ChatSpeculationPreset =
713
+ ChatSpeculationPresetGeneralChat | ChatSpeculationPresetSummarization | ChatSpeculationPresetClassification
714
+
715
+ export interface ClassificationOutputProbabilities {
716
+ values: Record<string, number>
717
+ }
718
+
719
+ export declare const enum ClassificationRole {
720
+ User = 'User',
721
+ Assistant = 'Assistant'
722
+ }
723
+
724
+ export type ContextLength =
725
+ ContextLengthDefault | ContextLengthMaximal | ContextLengthCustom
726
+
727
+ export type Grammar =
728
+ GrammarJsonAny | GrammarJsonSchema | GrammarRegex
729
+
730
+ export declare const enum HashMethod {
731
+ CRC32C = 'CRC32C',
732
+ MD5 = 'MD5'
733
+ }
734
+
735
+ export declare const enum ImageFormat {
736
+ Png = 'Png',
737
+ Webp = 'Webp',
738
+ Svg = 'Svg'
739
+ }
740
+
741
+ export declare const enum ImageTheme {
742
+ Light = 'Light',
743
+ Dark = 'Dark'
744
+ }
745
+
746
+ export type ModelAccessibility =
747
+ ModelAccessibilityLocal | ModelAccessibilityRemote
748
+
749
+ export type ModelReference =
750
+ ModelReferenceMirai | ModelReferenceHuggingFace | ModelReferenceLocal
751
+
752
+ export type ModelSpecialization =
753
+ ModelSpecializationChat | ModelSpecializationClassification | ModelSpecializationTextToSpeech | ModelSpecializationTranslation | ModelSpecializationSpeculation
754
+
755
+ export type PcmBatchError =
756
+ | { type: 'UnableToSaveAsWav', message: string }
757
+
758
+ export declare const enum ReasoningEffort {
759
+ Disabled = 'Disabled',
760
+ Default = 'Default',
761
+ Low = 'Low',
762
+ Medium = 'Medium',
763
+ High = 'High'
764
+ }
765
+
766
+ export type SamplingMethod =
767
+ SamplingMethodGreedy | SamplingMethodStochastic
768
+
769
+ export type SamplingPolicy =
770
+ SamplingPolicyDefault | SamplingPolicyCustom
771
+
772
+ export type SamplingSeed =
773
+ SamplingSeedDefault | SamplingSeedCustom
774
+
775
+ export type TokenId =
776
+ number
777
+
778
+ export type TokenValue =
779
+ string
780
+
781
+ export type ToolDescription =
782
+ ToolDescriptionFunction
783
+
784
+ export type TranslationPayload =
785
+ TranslationPayloadText | TranslationPayloadImage
786
+ export declare class Device {
787
+ osName?: string
788
+ cpuName?: string
789
+ memoryTotal: number
790
+ homePath: string
791
+ applicationIdentifier: string
792
+ isEnvironmentSandboxed: boolean
793
+ isKeyringAvailable: boolean
794
+ constructor(osName?: string, cpuName?: string, memoryTotal: number, homePath: string, applicationIdentifier: string, isEnvironmentSandboxed: boolean, isKeyringAvailable: boolean)
795
+
796
+ static create(): Device
797
+ }
798
+
799
+ export declare class Downloader {
800
+ get state(): Promise<DownloadState | null>
801
+ resume(): Promise<void>
802
+ pause(): Promise<void>
803
+ delete(): Promise<void>
804
+ progress(): Promise<DownloaderStream>
805
+ }
806
+
807
+ /**
808
+ * This type implements JavaScript's async iterable protocol.
809
+ * It can be used with `for await...of` loops.
810
+ *
811
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
812
+ */
813
+ export declare class DownloaderStream {
814
+ next(): Promise<DownloaderStreamUpdate | null>
815
+ [Symbol.asyncIterator](): AsyncGenerator<DownloaderStreamUpdate, void, undefined>
816
+ }
817
+
818
+ export declare class DownloaderStreamUpdate {
819
+ bytesTotal: number
820
+ bytesDownloaded: number
821
+ constructor(bytesTotal: number, bytesDownloaded: number)
822
+ get progress(): number
823
+ }
824
+
825
+ export declare class DownloadPhaseDownloaded {
826
+
827
+ constructor()
828
+ }
829
+
830
+ export declare class DownloadPhaseDownloading {
831
+
832
+ constructor()
833
+ }
834
+
835
+ export declare class DownloadPhaseError {
836
+ message: string
837
+ constructor(message: string)
838
+ }
839
+
840
+ export declare class DownloadPhaseLocked {
841
+
842
+ constructor()
843
+ }
844
+
845
+ export declare class DownloadPhaseNotDownloaded {
846
+
847
+ constructor()
848
+ }
849
+
850
+ export declare class DownloadPhasePaused {
851
+
852
+ constructor()
853
+ }
854
+
855
+ export declare class DownloadState {
856
+ totalBytes: number
857
+ downloadedBytes: number
858
+ phase: DownloadPhase
859
+ constructor(totalBytes: number, downloadedBytes: number, phase: DownloadPhase)
860
+ get progress(): number
861
+ get isInProgress(): boolean
862
+ get canPause(): boolean
863
+ get canDelete(): boolean
864
+ }
865
+
866
+ export declare class Engine {
867
+ static create(config: EngineConfig): Promise<Engine>
868
+ registerCallback(callback: EngineCallback): Promise<void>
869
+ removeRegistry(registryIdentifier: string): Promise<void>
870
+ removeBackend(identifier: string): Promise<void>
871
+ get models(): Promise<Array<Model>>
872
+ get modelsLocal(): Promise<Array<Model>>
873
+ get modelsRemote(): Promise<Array<Model>>
874
+ get modelsDownloadable(): Promise<Array<Model>>
875
+ get modelsForChat(): Promise<Array<Model>>
876
+ get modelsForClassification(): Promise<Array<Model>>
877
+ get modelsForTextToSpeech(): Promise<Array<Model>>
878
+ get modelsForTranslation(): Promise<Array<Model>>
879
+ get modelsForSpeculation(): Promise<Array<Model>>
880
+ get modelRegistries(): Promise<Array<ModelRegistry>>
881
+ get modelVendors(): Promise<Array<ModelVendor>>
882
+ modelsByVendor(vendorIdentifier: string): Promise<Array<Model>>
883
+ get modelFamilies(): Promise<Array<ModelFamily>>
884
+ modelsByFamily(familyIdentifier: string): Promise<Array<Model>>
885
+ model(identifier: string): Promise<Model | null>
886
+ modelByIdentifier(identifier: string): Promise<Model | null>
887
+ modelByRepoId(repoId: string): Promise<Model | null>
888
+ modelByPath(path: string): Promise<Model | null>
889
+ modelPath(model: Model): Promise<string | null>
890
+ downloader(model: Model): Downloader
891
+ download(model: Model): Promise<DownloaderStream>
892
+ downloadState(model: Model): Promise<DownloadState | null>
893
+ get downloadStates(): Promise<Record<string, DownloadState>>
894
+ chat(model: Model, config: ChatConfig): Promise<ChatSession>
895
+ classification(model: Model): Promise<ClassificationSession>
896
+ textToSpeech(model: Model): Promise<TextToSpeechSession>
897
+ }
898
+
899
+ export declare class EngineCallback {
900
+ static create(callback: () => void): EngineCallback
901
+ }
902
+
903
+ export declare class EngineConfig {
904
+ miraiApiKey?: string
905
+ lalamoPath?: string
906
+ huggingfaceApiKey?: string
907
+ openaiApiKey?: string
908
+ anthropicApiKey?: string
909
+ geminiApiKey?: string
910
+ xaiApiKey?: string
911
+ basetenApiKey?: string
912
+ openrouterApiKey?: string
913
+ allowOllamaUsage: boolean
914
+ allowLmstudioUsage: boolean
915
+ constructor(miraiApiKey?: string, lalamoPath?: string, huggingfaceApiKey?: string, openaiApiKey?: string, anthropicApiKey?: string, geminiApiKey?: string, xaiApiKey?: string, basetenApiKey?: string, openrouterApiKey?: string, allowOllamaUsage: boolean, allowLmstudioUsage: boolean)
916
+
917
+ static create(): EngineConfig
918
+ withMiraiApiKey(miraiApiKey: string): EngineConfig
919
+ withLalamoPath(lalamoPath: string): EngineConfig
920
+ withHuggingfaceApiKey(huggingfaceApiKey: string): EngineConfig
921
+ withOpenaiApiKey(openaiApiKey: string): EngineConfig
922
+ withAnthropicApiKey(anthropicApiKey: string): EngineConfig
923
+ withGeminiApiKey(geminiApiKey: string): EngineConfig
924
+ withXaiApiKey(xaiApiKey: string): EngineConfig
925
+ withBasetenApiKey(basetenApiKey: string): EngineConfig
926
+ withOpenrouterApiKey(openrouterApiKey: string): EngineConfig
927
+ withAllowOllamaUsage(allowOllamaUsage: boolean): EngineConfig
928
+ withAllowLmstudioUsage(allowLmstudioUsage: boolean): EngineConfig
929
+ }
930
+
931
+ export declare class Keyring {
932
+ store(key: string, value: string): void
933
+ retrieve(key: string): string | null
934
+ remove(key: string): void
935
+ static create(): Keyring
936
+ }
937
+
938
+ export type DeviceError =
939
+ | { type: 'UnsupportedDevice' }
940
+
941
+ export type DownloadPhase =
942
+ DownloadPhaseNotDownloaded | DownloadPhaseDownloading | DownloadPhasePaused | DownloadPhaseDownloaded | DownloadPhaseLocked | DownloadPhaseError
943
+
944
+ export type EngineError =
945
+ | { type: 'TokioError', message: string }
946
+ | { type: 'Device', field0: DeviceError }
947
+ | { type: 'Keyring', field0: KeyringError }
948
+ | { type: 'Storage', field0: StorageError }
949
+ | { type: 'Registry', field0: RegistryError }
950
+ | { type: 'UnableToCreateBackend' }
951
+ | { type: 'BackendNotFound' }
952
+ | { type: 'UnableToGetDownloaderProgressStream' }
953
+ | { type: 'ChatSession', field0: ChatSessionError }
954
+ | { type: 'ClassificationSession', field0: ClassificationSessionError }
955
+ | { type: 'TextToSpeechSession', field0: TextToSpeechSessionError }
956
+
957
+ export type KeyringError =
958
+ | { type: 'BackendError', message: string }
959
+ | { type: 'Device', field0: DeviceError }
960
+
961
+ export type RegistryError =
962
+ | { type: 'UnableToCreate', message: string }
963
+ | { type: 'UnableToGetModels', message: string }
964
+ | { type: 'UnableToAddRegistry', identifier: string }
965
+
966
+ export type StorageError =
967
+ | { type: 'UnableToCreateDirectory', path: string }
968
+ | { type: 'UnableToCreateDownloadManager', message: string }
969
+ | { type: 'DownloadManager', message: string }
970
+ | { type: 'HashNotFound', identifier: string, name: string }
971
+ | { type: 'InvalidStateTransition', from: DownloadPhase, to: DownloadPhase }
972
+ | { type: 'IO', message: string }
973
+ | { type: 'ItemNotFound', identifier: string }
974
+ | { type: 'Registry', field0: RegistryError }
975
+ | { type: 'UnsupportedItem', identifier: string }