@trymirai/uzu 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,12 +0,0 @@
1
- import { Model } from "../bridging/model.mjs";
2
- import { ChatModelInteractor } from "./chatModelInteractor.mjs";
3
- import { EngineInteractor } from "./engineInteractor.mjs";
4
- import { Interactor, InteractorEntity } from "./interactor.mjs";
5
- export declare class ChatModelsInteractor implements Interactor<Model[]> {
6
- readonly engineInteractor: EngineInteractor;
7
- readonly entity: InteractorEntity<Model[]>;
8
- constructor(engineInteractor: EngineInteractor, models: InteractorEntity<Model[]>);
9
- finalize(): Promise<Model[]>;
10
- get(repoId: string): ChatModelInteractor;
11
- }
12
- //# sourceMappingURL=chatModelsInteractor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatModelsInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OACO,EAAE,KAAK,EAAE;OAET,EAAE,mBAAmB,EAAE;OACvB,EAAE,gBAAgB,EAAE;OACpB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,oBAAqB,YAAW,UAAU,CAAC,KAAK,EAAE,CAAC;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,CAAC;gBAE/B,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAK3E,QAAQ,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAIlC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAQ3C"}
@@ -1,12 +0,0 @@
1
- import { Model } from "../bridging/model.js";
2
- import { ChatModelInteractor } from "./chatModelInteractor.js";
3
- import { EngineInteractor } from "./engineInteractor.js";
4
- import { Interactor, InteractorEntity } from "./interactor.js";
5
- export declare class ChatModelsInteractor implements Interactor<Model[]> {
6
- readonly engineInteractor: EngineInteractor;
7
- readonly entity: InteractorEntity<Model[]>;
8
- constructor(engineInteractor: EngineInteractor, models: InteractorEntity<Model[]>);
9
- finalize(): Promise<Model[]>;
10
- get(repoId: string): ChatModelInteractor;
11
- }
12
- //# sourceMappingURL=chatModelsInteractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatModelsInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OACO,EAAE,KAAK,EAAE;OAET,EAAE,mBAAmB,EAAE;OACvB,EAAE,gBAAgB,EAAE;OACpB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,oBAAqB,YAAW,UAAU,CAAC,KAAK,EAAE,CAAC;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,CAAC;gBAE/B,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAK3E,QAAQ,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAIlC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAQ3C"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatModelsInteractor = void 0;
4
- const config_1 = require("../bridging/config.js");
5
- const error_1 = require("../error.js");
6
- const chatModelInteractor_1 = require("./chatModelInteractor.js");
7
- class ChatModelsInteractor {
8
- constructor(engineInteractor, models) {
9
- this.engineInteractor = engineInteractor;
10
- this.entity = models;
11
- }
12
- async finalize() {
13
- return await this.entity;
14
- }
15
- get(repoId) {
16
- const modelPromise = (async () => {
17
- const models = await this.finalize();
18
- const model = models.find((model) => model.repoId === repoId);
19
- return (0, error_1.unwrapOrThrow)(model, error_1.EngineErrorCode.ModelNotFound);
20
- })();
21
- return new chatModelInteractor_1.ChatModelInteractor(this, modelPromise, config_1.Config.default());
22
- }
23
- }
24
- exports.ChatModelsInteractor = ChatModelsInteractor;
25
- //# sourceMappingURL=chatModelsInteractor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatModelsInteractor.js","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":";;;AAAA,kDAA4C;AAE5C,uCAA0D;AAC1D,kEAA4D;AAI5D,MAAa,oBAAoB;IAI7B,YAAY,gBAAkC,EAAE,MAAiC;QAC7E,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,MAAc;QACd,MAAM,YAAY,GAAG,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YAC9D,OAAO,IAAA,qBAAa,EAAC,KAAK,EAAE,uBAAe,CAAC,aAAa,CAAC,CAAC;QAC/D,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,yCAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACJ;AArBD,oDAqBC"}
@@ -1,21 +0,0 @@
1
- import { Config } from "../bridging/config.mjs";
2
- import { EngineErrorCode, unwrapOrThrow } from "../error.mjs";
3
- import { ChatModelInteractor } from "./chatModelInteractor.mjs";
4
- export class ChatModelsInteractor {
5
- constructor(engineInteractor, models) {
6
- this.engineInteractor = engineInteractor;
7
- this.entity = models;
8
- }
9
- async finalize() {
10
- return await this.entity;
11
- }
12
- get(repoId) {
13
- const modelPromise = (async () => {
14
- const models = await this.finalize();
15
- const model = models.find((model) => model.repoId === repoId);
16
- return unwrapOrThrow(model, EngineErrorCode.ModelNotFound);
17
- })();
18
- return new ChatModelInteractor(this, modelPromise, Config.default());
19
- }
20
- }
21
- //# sourceMappingURL=chatModelsInteractor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatModelsInteractor.mjs","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,EAAE;OAEV,EAAE,eAAe,EAAE,aAAa,EAAE;OAClC,EAAE,mBAAmB,EAAE;AAI9B,MAAM,OAAO,oBAAoB;IAI7B,YAAY,gBAAkC,EAAE,MAAiC;QAC7E,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,MAAc;QACd,MAAM,YAAY,GAAG,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YAC9D,OAAO,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;QAC/D,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACJ"}
@@ -1,26 +0,0 @@
1
- import { ChatSession } from "../bridging/chatSession.mjs";
2
- import { GrammarConfig } from "../bridging/grammarConfig.mjs";
3
- import { Input } from "../bridging/input.mjs";
4
- import { Message } from "../bridging/message.mjs";
5
- import { Output } from "../bridging/output.mjs";
6
- import { RunConfig } from "../bridging/runConfig.mjs";
7
- import { SamplingMethod } from "../bridging/samplingMethod.mjs";
8
- import { SamplingPolicy } from "../bridging/samplingPolicy.mjs";
9
- import { ChatModelInteractor } from "./chatModelInteractor.mjs";
10
- import { Interactor, InteractorEntity } from "./interactor.mjs";
11
- export declare class ChatSessionInteractor implements Interactor<ChatSession> {
12
- readonly modelInteractor: ChatModelInteractor;
13
- readonly entity: InteractorEntity<ChatSession>;
14
- readonly config: RunConfig;
15
- constructor(modelInteractor: ChatModelInteractor, session: InteractorEntity<ChatSession>, config: RunConfig);
16
- finalize(): Promise<ChatSession>;
17
- tokensLimit(tokensLimit: number): ChatSessionInteractor;
18
- enableThinking(enableThinking: boolean): ChatSessionInteractor;
19
- samplingPolicy(samplingPolicy: SamplingPolicy): ChatSessionInteractor;
20
- samplingMethod(samplingMethod: SamplingMethod): ChatSessionInteractor;
21
- grammarConfig(grammarConfig: GrammarConfig | null): ChatSessionInteractor;
22
- run(input: Input, progress?: (partialOutput: Output) => boolean): Promise<Output>;
23
- reply(text: string, progress?: (partialOutput: Output) => boolean): Promise<Output>;
24
- replyToMessages(messages: Message[], progress?: (partialOutput: Output) => boolean): Promise<Output>;
25
- }
26
- //# sourceMappingURL=chatSessionInteractor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatSessionInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;OACf,EAAE,aAAa,EAAE;OACjB,EAAE,KAAK,EAAE;OACT,EAAE,OAAO,EAAE;OACX,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;OACb,EAAE,cAAc,EAAE;OAClB,EAAE,cAAc,EAAE;OAClB,EAAE,mBAAmB,EAAE;OACvB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,qBAAsB,YAAW,UAAU,CAAC,WAAW,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;gBAGvB,eAAe,EAAE,mBAAmB,EACpC,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,EACtC,MAAM,EAAE,SAAS;IAOf,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAMtC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB;IAKvD,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,qBAAqB;IAK9D,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,qBAAqB;IAKrE,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,qBAAqB;IAKrE,aAAa,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,qBAAqB;IAOnE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAU7F,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/F,eAAe,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,OAAO,CAAC,MAAM,CAAC;CAGrB"}
@@ -1,26 +0,0 @@
1
- import { ChatSession } from "../bridging/chatSession.js";
2
- import { GrammarConfig } from "../bridging/grammarConfig.js";
3
- import { Input } from "../bridging/input.js";
4
- import { Message } from "../bridging/message.js";
5
- import { Output } from "../bridging/output.js";
6
- import { RunConfig } from "../bridging/runConfig.js";
7
- import { SamplingMethod } from "../bridging/samplingMethod.js";
8
- import { SamplingPolicy } from "../bridging/samplingPolicy.js";
9
- import { ChatModelInteractor } from "./chatModelInteractor.js";
10
- import { Interactor, InteractorEntity } from "./interactor.js";
11
- export declare class ChatSessionInteractor implements Interactor<ChatSession> {
12
- readonly modelInteractor: ChatModelInteractor;
13
- readonly entity: InteractorEntity<ChatSession>;
14
- readonly config: RunConfig;
15
- constructor(modelInteractor: ChatModelInteractor, session: InteractorEntity<ChatSession>, config: RunConfig);
16
- finalize(): Promise<ChatSession>;
17
- tokensLimit(tokensLimit: number): ChatSessionInteractor;
18
- enableThinking(enableThinking: boolean): ChatSessionInteractor;
19
- samplingPolicy(samplingPolicy: SamplingPolicy): ChatSessionInteractor;
20
- samplingMethod(samplingMethod: SamplingMethod): ChatSessionInteractor;
21
- grammarConfig(grammarConfig: GrammarConfig | null): ChatSessionInteractor;
22
- run(input: Input, progress?: (partialOutput: Output) => boolean): Promise<Output>;
23
- reply(text: string, progress?: (partialOutput: Output) => boolean): Promise<Output>;
24
- replyToMessages(messages: Message[], progress?: (partialOutput: Output) => boolean): Promise<Output>;
25
- }
26
- //# sourceMappingURL=chatSessionInteractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatSessionInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;OACf,EAAE,aAAa,EAAE;OACjB,EAAE,KAAK,EAAE;OACT,EAAE,OAAO,EAAE;OACX,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;OACb,EAAE,cAAc,EAAE;OAClB,EAAE,cAAc,EAAE;OAClB,EAAE,mBAAmB,EAAE;OACvB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,qBAAsB,YAAW,UAAU,CAAC,WAAW,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;gBAGvB,eAAe,EAAE,mBAAmB,EACpC,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,EACtC,MAAM,EAAE,SAAS;IAOf,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAMtC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB;IAKvD,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,qBAAqB;IAK9D,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,qBAAqB;IAKrE,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,qBAAqB;IAKrE,aAAa,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,qBAAqB;IAOnE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAU7F,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/F,eAAe,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,OAAO,CAAC,MAAM,CAAC;CAGrB"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatSessionInteractor = void 0;
4
- const input_1 = require("../bridging/input.js");
5
- const samplingPolicy_1 = require("../bridging/samplingPolicy.js");
6
- class ChatSessionInteractor {
7
- constructor(modelInteractor, session, config) {
8
- this.modelInteractor = modelInteractor;
9
- this.entity = session;
10
- this.config = config;
11
- }
12
- async finalize() {
13
- return await this.entity;
14
- }
15
- /* Config */
16
- tokensLimit(tokensLimit) {
17
- const config = this.config.withTokensLimit(tokensLimit);
18
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
19
- }
20
- enableThinking(enableThinking) {
21
- const config = this.config.withEnableThinking(enableThinking);
22
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
23
- }
24
- samplingPolicy(samplingPolicy) {
25
- const config = this.config.withSamplingPolicy(samplingPolicy);
26
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
27
- }
28
- samplingMethod(samplingMethod) {
29
- const config = this.config.withSamplingPolicy(samplingPolicy_1.SamplingPolicy.custom(samplingMethod));
30
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
31
- }
32
- grammarConfig(grammarConfig) {
33
- const config = this.config.withGrammarConfig(grammarConfig);
34
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
35
- }
36
- /* Run */
37
- async run(input, progress = () => true) {
38
- const outputPromise = (async () => {
39
- const session = await this.finalize();
40
- const output = session.run(input, this.config, progress);
41
- return output;
42
- })();
43
- const output = await outputPromise;
44
- return output;
45
- }
46
- async reply(text, progress = () => true) {
47
- return await this.run(input_1.Input.text(text), progress);
48
- }
49
- async replyToMessages(messages, progress = () => true) {
50
- return await this.run(input_1.Input.messages(messages), progress);
51
- }
52
- }
53
- exports.ChatSessionInteractor = ChatSessionInteractor;
54
- //# sourceMappingURL=chatSessionInteractor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatSessionInteractor.js","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":";;;AAEA,gDAA0C;AAK1C,kEAA4D;AAI5D,MAAa,qBAAqB;IAK9B,YACI,eAAoC,EACpC,OAAsC,EACtC,MAAiB;QAEjB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,YAAY;IAEZ,WAAW,CAAC,WAAmB;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACxD,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAAuB;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC9D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAA8B;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC9D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAA8B;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,+BAAc,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QACrF,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,aAAa,CAAC,aAAmC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAC5D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,SAAS;IAET,KAAK,CAAC,GAAG,CAAC,KAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC7E,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YACzD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC/E,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,aAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CACjB,QAAmB,EACnB,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACJ;AApED,sDAoEC"}
@@ -1,50 +0,0 @@
1
- import { Input } from "../bridging/input.mjs";
2
- import { SamplingPolicy } from "../bridging/samplingPolicy.mjs";
3
- export class ChatSessionInteractor {
4
- constructor(modelInteractor, session, config) {
5
- this.modelInteractor = modelInteractor;
6
- this.entity = session;
7
- this.config = config;
8
- }
9
- async finalize() {
10
- return await this.entity;
11
- }
12
- /* Config */
13
- tokensLimit(tokensLimit) {
14
- const config = this.config.withTokensLimit(tokensLimit);
15
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
16
- }
17
- enableThinking(enableThinking) {
18
- const config = this.config.withEnableThinking(enableThinking);
19
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
20
- }
21
- samplingPolicy(samplingPolicy) {
22
- const config = this.config.withSamplingPolicy(samplingPolicy);
23
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
24
- }
25
- samplingMethod(samplingMethod) {
26
- const config = this.config.withSamplingPolicy(SamplingPolicy.custom(samplingMethod));
27
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
28
- }
29
- grammarConfig(grammarConfig) {
30
- const config = this.config.withGrammarConfig(grammarConfig);
31
- return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
32
- }
33
- /* Run */
34
- async run(input, progress = () => true) {
35
- const outputPromise = (async () => {
36
- const session = await this.finalize();
37
- const output = session.run(input, this.config, progress);
38
- return output;
39
- })();
40
- const output = await outputPromise;
41
- return output;
42
- }
43
- async reply(text, progress = () => true) {
44
- return await this.run(Input.text(text), progress);
45
- }
46
- async replyToMessages(messages, progress = () => true) {
47
- return await this.run(Input.messages(messages), progress);
48
- }
49
- }
50
- //# sourceMappingURL=chatSessionInteractor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatSessionInteractor.mjs","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE;OAKT,EAAE,cAAc,EAAE;AAIzB,MAAM,OAAO,qBAAqB;IAK9B,YACI,eAAoC,EACpC,OAAsC,EACtC,MAAiB;QAEjB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,YAAY;IAEZ,WAAW,CAAC,WAAmB;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACxD,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAAuB;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC9D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAA8B;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC9D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,cAA8B;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QACrF,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,aAAa,CAAC,aAAmC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAC5D,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,SAAS;IAET,KAAK,CAAC,GAAG,CAAC,KAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC7E,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YACzD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC/E,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CACjB,QAAmB,EACnB,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACJ"}
@@ -1,16 +0,0 @@
1
- import { DownloadHandle } from "../bridging/downloadHandle.mjs";
2
- import { DownloadProgressUpdate } from "../bridging/downloadProgressUpdate.mjs";
3
- import { ChatModelInteractor } from "./chatModelInteractor.mjs";
4
- import { Interactor, InteractorEntity } from "./interactor.mjs";
5
- export declare class DownloadInteractor implements Interactor<DownloadHandle> {
6
- readonly modelInteractor: ChatModelInteractor;
7
- readonly entity: InteractorEntity<DownloadHandle>;
8
- constructor(modelInteractor: ChatModelInteractor, handle: InteractorEntity<DownloadHandle>);
9
- finalize(): Promise<DownloadHandle>;
10
- resume(): DownloadInteractor;
11
- pause(): DownloadInteractor;
12
- delete(): DownloadInteractor;
13
- onProgressUpdate(callback: (progressUpdate: DownloadProgressUpdate) => void): DownloadInteractor;
14
- private proxyHandleCall;
15
- }
16
- //# sourceMappingURL=downloadInteractor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"downloadInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/downloadInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAClB,EAAE,sBAAsB,EAAE;OAC1B,EAAE,mBAAmB,EAAE;OACvB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,kBAAmB,YAAW,UAAU,CAAC,cAAc,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;gBAEtC,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC;IAKpF,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IAIzC,MAAM;IAIN,KAAK;IAIL,MAAM;IAIN,gBAAgB,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,IAAI;IAQ3E,OAAO,CAAC,eAAe;CAQ1B"}
@@ -1,16 +0,0 @@
1
- import { DownloadHandle } from "../bridging/downloadHandle.js";
2
- import { DownloadProgressUpdate } from "../bridging/downloadProgressUpdate.js";
3
- import { ChatModelInteractor } from "./chatModelInteractor.js";
4
- import { Interactor, InteractorEntity } from "./interactor.js";
5
- export declare class DownloadInteractor implements Interactor<DownloadHandle> {
6
- readonly modelInteractor: ChatModelInteractor;
7
- readonly entity: InteractorEntity<DownloadHandle>;
8
- constructor(modelInteractor: ChatModelInteractor, handle: InteractorEntity<DownloadHandle>);
9
- finalize(): Promise<DownloadHandle>;
10
- resume(): DownloadInteractor;
11
- pause(): DownloadInteractor;
12
- delete(): DownloadInteractor;
13
- onProgressUpdate(callback: (progressUpdate: DownloadProgressUpdate) => void): DownloadInteractor;
14
- private proxyHandleCall;
15
- }
16
- //# sourceMappingURL=downloadInteractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"downloadInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/downloadInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAClB,EAAE,sBAAsB,EAAE;OAC1B,EAAE,mBAAmB,EAAE;OACvB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,kBAAmB,YAAW,UAAU,CAAC,cAAc,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;gBAEtC,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC;IAKpF,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IAIzC,MAAM;IAIN,KAAK;IAIL,MAAM;IAIN,gBAAgB,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,IAAI;IAQ3E,OAAO,CAAC,eAAe;CAQ1B"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DownloadInteractor = void 0;
4
- class DownloadInteractor {
5
- constructor(modelInteractor, handle) {
6
- this.modelInteractor = modelInteractor;
7
- this.entity = handle;
8
- }
9
- async finalize() {
10
- return await this.entity;
11
- }
12
- resume() {
13
- return this.proxyHandleCall(async (handle) => await handle.download());
14
- }
15
- pause() {
16
- return this.proxyHandleCall(async (handle) => await handle.pause());
17
- }
18
- delete() {
19
- return this.proxyHandleCall(async (handle) => await handle.delete());
20
- }
21
- onProgressUpdate(callback) {
22
- return this.proxyHandleCall(async (handle) => {
23
- for await (const update of handle.progressUpdate()) {
24
- callback(update);
25
- }
26
- });
27
- }
28
- proxyHandleCall(callback) {
29
- const handlePromise = (async () => {
30
- const handle = await this.finalize();
31
- await callback(handle);
32
- return handle;
33
- })();
34
- return new DownloadInteractor(this.modelInteractor, handlePromise);
35
- }
36
- }
37
- exports.DownloadInteractor = DownloadInteractor;
38
- //# sourceMappingURL=downloadInteractor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"downloadInteractor.js","sourceRoot":"","sources":["../src/interactors/downloadInteractor.ts"],"names":[],"mappings":";;;AAKA,MAAa,kBAAkB;IAI3B,YAAY,eAAoC,EAAE,MAAwC;QACtF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,gBAAgB,CAAC,QAA0D;QACvE,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC;gBACjD,QAAQ,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,eAAe,CAAC,QAAmD;QACvE,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,CAAC;CACJ;AAzCD,gDAyCC"}
@@ -1,34 +0,0 @@
1
- export class DownloadInteractor {
2
- constructor(modelInteractor, handle) {
3
- this.modelInteractor = modelInteractor;
4
- this.entity = handle;
5
- }
6
- async finalize() {
7
- return await this.entity;
8
- }
9
- resume() {
10
- return this.proxyHandleCall(async (handle) => await handle.download());
11
- }
12
- pause() {
13
- return this.proxyHandleCall(async (handle) => await handle.pause());
14
- }
15
- delete() {
16
- return this.proxyHandleCall(async (handle) => await handle.delete());
17
- }
18
- onProgressUpdate(callback) {
19
- return this.proxyHandleCall(async (handle) => {
20
- for await (const update of handle.progressUpdate()) {
21
- callback(update);
22
- }
23
- });
24
- }
25
- proxyHandleCall(callback) {
26
- const handlePromise = (async () => {
27
- const handle = await this.finalize();
28
- await callback(handle);
29
- return handle;
30
- })();
31
- return new DownloadInteractor(this.modelInteractor, handlePromise);
32
- }
33
- }
34
- //# sourceMappingURL=downloadInteractor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"downloadInteractor.mjs","sourceRoot":"","sources":["../src/interactors/downloadInteractor.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,kBAAkB;IAI3B,YAAY,eAAoC,EAAE,MAAwC;QACtF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,gBAAgB,CAAC,QAA0D;QACvE,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC;gBACjD,QAAQ,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,eAAe,CAAC,QAAmD;QACvE,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,CAAC;CACJ"}
@@ -1,15 +0,0 @@
1
- import { Engine } from "../bridging/engine.mjs";
2
- import { ModelKind } from "../bridging/modelKind.mjs";
3
- import { ChatModelInteractor } from "./chatModelInteractor.mjs";
4
- import { ChatModelsInteractor } from "./chatModelsInteractor.mjs";
5
- import { Interactor, InteractorEntity } from "./interactor.mjs";
6
- export declare class EngineInteractor implements Interactor<Engine> {
7
- readonly entity: InteractorEntity<Engine>;
8
- readonly modelKindFilter: ModelKind[] | null;
9
- constructor(engine: InteractorEntity<Engine>, modelKindFilter?: ModelKind[] | null);
10
- finalize(): Promise<Engine>;
11
- filterKinds(kinds: ModelKind[] | null): EngineInteractor;
12
- chatModels(): ChatModelsInteractor;
13
- chatModel(repoId: string): ChatModelInteractor;
14
- }
15
- //# sourceMappingURL=engineInteractor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engineInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/engineInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;OACb,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,gBAAiB,YAAW,UAAU,CAAC,MAAM,CAAC;IACvD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAEjC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW;IAKlF,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAMjC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,gBAAgB;IAIxD,UAAU,IAAI,oBAAoB;IAQlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAIjD"}
@@ -1,15 +0,0 @@
1
- import { Engine } from "../bridging/engine.js";
2
- import { ModelKind } from "../bridging/modelKind.js";
3
- import { ChatModelInteractor } from "./chatModelInteractor.js";
4
- import { ChatModelsInteractor } from "./chatModelsInteractor.js";
5
- import { Interactor, InteractorEntity } from "./interactor.js";
6
- export declare class EngineInteractor implements Interactor<Engine> {
7
- readonly entity: InteractorEntity<Engine>;
8
- readonly modelKindFilter: ModelKind[] | null;
9
- constructor(engine: InteractorEntity<Engine>, modelKindFilter?: ModelKind[] | null);
10
- finalize(): Promise<Engine>;
11
- filterKinds(kinds: ModelKind[] | null): EngineInteractor;
12
- chatModels(): ChatModelsInteractor;
13
- chatModel(repoId: string): ChatModelInteractor;
14
- }
15
- //# sourceMappingURL=engineInteractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engineInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/engineInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;OACb,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,gBAAiB,YAAW,UAAU,CAAC,MAAM,CAAC;IACvD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAEjC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW;IAKlF,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAMjC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,gBAAgB;IAIxD,UAAU,IAAI,oBAAoB;IAQlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAIjD"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EngineInteractor = void 0;
4
- const chatModelsInteractor_1 = require("./chatModelsInteractor.js");
5
- class EngineInteractor {
6
- constructor(engine, modelKindFilter = null) {
7
- this.entity = engine;
8
- this.modelKindFilter = modelKindFilter;
9
- }
10
- async finalize() {
11
- return await this.entity;
12
- }
13
- /* Models */
14
- filterKinds(kinds) {
15
- return new EngineInteractor(this.entity, kinds);
16
- }
17
- chatModels() {
18
- const modelsPromise = (async () => {
19
- const engine = await this.finalize();
20
- return await engine.chatModels(this.modelKindFilter);
21
- })();
22
- return new chatModelsInteractor_1.ChatModelsInteractor(this, modelsPromise);
23
- }
24
- chatModel(repoId) {
25
- const models = this.chatModels();
26
- return models.get(repoId);
27
- }
28
- }
29
- exports.EngineInteractor = EngineInteractor;
30
- //# sourceMappingURL=engineInteractor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engineInteractor.js","sourceRoot":"","sources":["../src/interactors/engineInteractor.ts"],"names":[],"mappings":";;;AAGA,oEAA8D;AAG9D,MAAa,gBAAgB;IAIzB,YAAY,MAAgC,EAAE,kBAAsC,IAAI;QACpF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,YAAY;IAEZ,WAAW,CAAC,KAAyB;QACjC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,UAAU;QACN,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,OAAO,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzD,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,2CAAoB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC;IAED,SAAS,CAAC,MAAc;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACJ;AA/BD,4CA+BC"}
@@ -1,26 +0,0 @@
1
- import { ChatModelsInteractor } from "./chatModelsInteractor.mjs";
2
- export class EngineInteractor {
3
- constructor(engine, modelKindFilter = null) {
4
- this.entity = engine;
5
- this.modelKindFilter = modelKindFilter;
6
- }
7
- async finalize() {
8
- return await this.entity;
9
- }
10
- /* Models */
11
- filterKinds(kinds) {
12
- return new EngineInteractor(this.entity, kinds);
13
- }
14
- chatModels() {
15
- const modelsPromise = (async () => {
16
- const engine = await this.finalize();
17
- return await engine.chatModels(this.modelKindFilter);
18
- })();
19
- return new ChatModelsInteractor(this, modelsPromise);
20
- }
21
- chatModel(repoId) {
22
- const models = this.chatModels();
23
- return models.get(repoId);
24
- }
25
- }
26
- //# sourceMappingURL=engineInteractor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engineInteractor.mjs","sourceRoot":"","sources":["../src/interactors/engineInteractor.ts"],"names":[],"mappings":"OAGO,EAAE,oBAAoB,EAAE;AAG/B,MAAM,OAAO,gBAAgB;IAIzB,YAAY,MAAgC,EAAE,kBAAsC,IAAI;QACpF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,YAAY;IAEZ,WAAW,CAAC,KAAyB;QACjC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,UAAU;QACN,MAAM,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,OAAO,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzD,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,oBAAoB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC;IAED,SAAS,CAAC,MAAc;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACJ"}
@@ -1,6 +0,0 @@
1
- export type InteractorEntity<T> = T | Promise<T>;
2
- export interface Interactor<T> {
3
- readonly entity: InteractorEntity<T>;
4
- finalize(): Promise<T>;
5
- }
6
- //# sourceMappingURL=interactor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactor.d.mts","sourceRoot":"","sources":["../src/interactors/interactor.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,WAAW,UAAU,CAAC,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAErC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B"}
@@ -1,6 +0,0 @@
1
- export type InteractorEntity<T> = T | Promise<T>;
2
- export interface Interactor<T> {
3
- readonly entity: InteractorEntity<T>;
4
- finalize(): Promise<T>;
5
- }
6
- //# sourceMappingURL=interactor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactor.d.ts","sourceRoot":"","sources":["../src/interactors/interactor.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,WAAW,UAAU,CAAC,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAErC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=interactor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactor.js","sourceRoot":"","sources":["../src/interactors/interactor.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=interactor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactor.mjs","sourceRoot":"","sources":["../src/interactors/interactor.ts"],"names":[],"mappings":""}