@trymirai/uzu 0.1.39 → 0.1.42

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 (143) hide show
  1. package/README.md +30 -6
  2. package/bridging/chatModel.d.mts +15 -0
  3. package/bridging/chatModel.d.mts.map +1 -0
  4. package/bridging/chatModel.d.ts +15 -0
  5. package/bridging/chatModel.d.ts.map +1 -0
  6. package/bridging/chatModel.js +33 -0
  7. package/bridging/chatModel.js.map +1 -0
  8. package/bridging/chatModel.mjs +29 -0
  9. package/bridging/chatModel.mjs.map +1 -0
  10. package/bridging/chatSession.d.mts +10 -0
  11. package/bridging/chatSession.d.mts.map +1 -0
  12. package/bridging/chatSession.d.ts +10 -0
  13. package/bridging/chatSession.d.ts.map +1 -0
  14. package/bridging/{session.js → chatSession.js} +7 -7
  15. package/bridging/chatSession.js.map +1 -0
  16. package/bridging/{session.mjs → chatSession.mjs} +5 -5
  17. package/bridging/chatSession.mjs.map +1 -0
  18. package/bridging/engine.d.mts +10 -10
  19. package/bridging/engine.d.mts.map +1 -1
  20. package/bridging/engine.d.ts +10 -10
  21. package/bridging/engine.d.ts.map +1 -1
  22. package/bridging/engine.js +42 -44
  23. package/bridging/engine.js.map +1 -1
  24. package/bridging/engine.mjs +43 -45
  25. package/bridging/engine.mjs.map +1 -1
  26. package/bridging/modelType.d.mts +2 -1
  27. package/bridging/modelType.d.mts.map +1 -1
  28. package/bridging/modelType.d.ts +2 -1
  29. package/bridging/modelType.d.ts.map +1 -1
  30. package/bridging/modelType.js +14 -2
  31. package/bridging/modelType.js.map +1 -1
  32. package/bridging/modelType.mjs +12 -1
  33. package/bridging/modelType.mjs.map +1 -1
  34. package/error.d.mts +1 -1
  35. package/error.d.mts.map +1 -1
  36. package/error.d.ts +1 -1
  37. package/error.d.ts.map +1 -1
  38. package/error.js +2 -2
  39. package/error.js.map +1 -1
  40. package/error.mjs +2 -2
  41. package/error.mjs.map +1 -1
  42. package/index.d.mts +5 -5
  43. package/index.d.mts.map +1 -1
  44. package/index.d.ts +5 -5
  45. package/index.d.ts.map +1 -1
  46. package/index.js +11 -12
  47. package/index.js.map +1 -1
  48. package/index.mjs +5 -5
  49. package/index.mjs.map +1 -1
  50. package/interactors/{modelInteractor.d.mts → chatModelInteractor.d.mts} +15 -15
  51. package/interactors/chatModelInteractor.d.mts.map +1 -0
  52. package/interactors/{modelInteractor.d.ts → chatModelInteractor.d.ts} +15 -15
  53. package/interactors/chatModelInteractor.d.ts.map +1 -0
  54. package/interactors/{modelInteractor.js → chatModelInteractor.js} +13 -13
  55. package/interactors/chatModelInteractor.js.map +1 -0
  56. package/interactors/{modelInteractor.mjs → chatModelInteractor.mjs} +11 -11
  57. package/interactors/chatModelInteractor.mjs.map +1 -0
  58. package/interactors/chatModelsInteractor.d.mts +12 -0
  59. package/interactors/chatModelsInteractor.d.mts.map +1 -0
  60. package/interactors/chatModelsInteractor.d.ts +12 -0
  61. package/interactors/chatModelsInteractor.d.ts.map +1 -0
  62. package/interactors/{modelsInteractor.js → chatModelsInteractor.js} +6 -6
  63. package/interactors/chatModelsInteractor.js.map +1 -0
  64. package/interactors/{modelsInteractor.mjs → chatModelsInteractor.mjs} +4 -4
  65. package/interactors/chatModelsInteractor.mjs.map +1 -0
  66. package/interactors/chatSessionInteractor.d.mts +24 -0
  67. package/interactors/chatSessionInteractor.d.mts.map +1 -0
  68. package/interactors/chatSessionInteractor.d.ts +24 -0
  69. package/interactors/chatSessionInteractor.d.ts.map +1 -0
  70. package/interactors/{sessionInteractor.js → chatSessionInteractor.js} +8 -8
  71. package/interactors/chatSessionInteractor.js.map +1 -0
  72. package/interactors/{sessionInteractor.mjs → chatSessionInteractor.mjs} +6 -6
  73. package/interactors/chatSessionInteractor.mjs.map +1 -0
  74. package/interactors/downloadInteractor.d.mts +3 -3
  75. package/interactors/downloadInteractor.d.mts.map +1 -1
  76. package/interactors/downloadInteractor.d.ts +3 -3
  77. package/interactors/downloadInteractor.d.ts.map +1 -1
  78. package/interactors/downloadInteractor.js.map +1 -1
  79. package/interactors/downloadInteractor.mjs.map +1 -1
  80. package/interactors/engineInteractor.d.mts +5 -8
  81. package/interactors/engineInteractor.d.mts.map +1 -1
  82. package/interactors/engineInteractor.d.ts +5 -8
  83. package/interactors/engineInteractor.d.ts.map +1 -1
  84. package/interactors/engineInteractor.js +8 -12
  85. package/interactors/engineInteractor.js.map +1 -1
  86. package/interactors/engineInteractor.mjs +8 -12
  87. package/interactors/engineInteractor.mjs.map +1 -1
  88. package/napi/uzu.d.ts +18 -32
  89. package/napi/uzu.js +4 -6
  90. package/napi/uzu.mjs +2 -3
  91. package/napi/uzu.node +0 -0
  92. package/package.json +1 -1
  93. package/src/bridging/chatModel.ts +54 -0
  94. package/src/bridging/{session.ts → chatSession.ts} +6 -6
  95. package/src/bridging/engine.ts +47 -47
  96. package/src/bridging/modelType.ts +13 -1
  97. package/src/error.ts +2 -2
  98. package/src/index.ts +5 -5
  99. package/src/interactors/{modelInteractor.ts → chatModelInteractor.ts} +22 -22
  100. package/src/interactors/{modelsInteractor.ts → chatModelsInteractor.ts} +8 -8
  101. package/src/interactors/{sessionInteractor.ts → chatSessionInteractor.ts} +19 -15
  102. package/src/interactors/downloadInteractor.ts +3 -3
  103. package/src/interactors/engineInteractor.ts +9 -20
  104. package/src/napi/uzu.d.ts +18 -32
  105. package/src/napi/uzu.js +4 -6
  106. package/src/napi/uzu.mjs +2 -3
  107. package/src/napi/uzu.node +0 -0
  108. package/src/version.ts +1 -1
  109. package/version.d.mts +1 -1
  110. package/version.d.ts +1 -1
  111. package/version.js +1 -1
  112. package/version.mjs +1 -1
  113. package/bridging/model.d.mts +0 -18
  114. package/bridging/model.d.mts.map +0 -1
  115. package/bridging/model.d.ts +0 -18
  116. package/bridging/model.d.ts.map +0 -1
  117. package/bridging/model.js +0 -27
  118. package/bridging/model.js.map +0 -1
  119. package/bridging/model.mjs +0 -23
  120. package/bridging/model.mjs.map +0 -1
  121. package/bridging/session.d.mts +0 -10
  122. package/bridging/session.d.mts.map +0 -1
  123. package/bridging/session.d.ts +0 -10
  124. package/bridging/session.d.ts.map +0 -1
  125. package/bridging/session.js.map +0 -1
  126. package/bridging/session.mjs.map +0 -1
  127. package/interactors/modelInteractor.d.mts.map +0 -1
  128. package/interactors/modelInteractor.d.ts.map +0 -1
  129. package/interactors/modelInteractor.js.map +0 -1
  130. package/interactors/modelInteractor.mjs.map +0 -1
  131. package/interactors/modelsInteractor.d.mts +0 -12
  132. package/interactors/modelsInteractor.d.mts.map +0 -1
  133. package/interactors/modelsInteractor.d.ts +0 -12
  134. package/interactors/modelsInteractor.d.ts.map +0 -1
  135. package/interactors/modelsInteractor.js.map +0 -1
  136. package/interactors/modelsInteractor.mjs.map +0 -1
  137. package/interactors/sessionInteractor.d.mts +0 -24
  138. package/interactors/sessionInteractor.d.mts.map +0 -1
  139. package/interactors/sessionInteractor.d.ts +0 -24
  140. package/interactors/sessionInteractor.d.ts.map +0 -1
  141. package/interactors/sessionInteractor.js.map +0 -1
  142. package/interactors/sessionInteractor.mjs.map +0 -1
  143. package/src/bridging/model.ts +0 -58
@@ -1,30 +1,30 @@
1
+ import { ChatModel } from "../bridging/chatModel.js";
1
2
  import { Config } from "../bridging/config.js";
2
3
  import { ContextLength } from "../bridging/contextLength.js";
3
4
  import { DownloadProgressUpdate } from "../bridging/downloadProgressUpdate.js";
4
5
  import { Message } from "../bridging/message.js";
5
- import { Model } from "../bridging/model.js";
6
6
  import { Output } from "../bridging/output.js";
7
7
  import { PrefillStepSize } from "../bridging/prefillStepSize.js";
8
8
  import { Preset } from "../bridging/preset.js";
9
9
  import { SamplingSeed } from "../bridging/samplingSeed.js";
10
+ import { ChatModelsInteractor } from "./chatModelsInteractor.js";
11
+ import { ChatSessionInteractor } from "./chatSessionInteractor.js";
10
12
  import { DownloadInteractor } from "./downloadInteractor.js";
11
13
  import { Interactor, InteractorEntity } from "./interactor.js";
12
- import { ModelsInteractor } from "./modelsInteractor.js";
13
- import { SessionInteractor } from "./sessionInteractor.js";
14
- export declare class ModelInteractor implements Interactor<Model> {
15
- readonly modelsInteractor: ModelsInteractor;
16
- readonly entity: InteractorEntity<Model>;
14
+ export declare class ChatModelInteractor implements Interactor<ChatModel> {
15
+ readonly modelsInteractor: ChatModelsInteractor;
16
+ readonly entity: InteractorEntity<ChatModel>;
17
17
  readonly config: Config;
18
- constructor(modelsInteractor: ModelsInteractor, model: InteractorEntity<Model>, config: Config);
19
- finalize(): Promise<Model>;
18
+ constructor(modelsInteractor: ChatModelsInteractor, model: InteractorEntity<ChatModel>, config: Config);
19
+ finalize(): Promise<ChatModel>;
20
20
  downloading(): DownloadInteractor;
21
- download(callback?: (progressUpdate: DownloadProgressUpdate) => void): ModelInteractor;
22
- preset(preset: Preset): ModelInteractor;
23
- prefillStepSize(prefillStepSize: PrefillStepSize): ModelInteractor;
24
- contextLength(contextLength: ContextLength): ModelInteractor;
25
- samplingSeed(samplingSeed: SamplingSeed): ModelInteractor;
26
- session(): SessionInteractor;
21
+ download(callback?: (progressUpdate: DownloadProgressUpdate) => void): ChatModelInteractor;
22
+ preset(preset: Preset): ChatModelInteractor;
23
+ prefillStepSize(prefillStepSize: PrefillStepSize): ChatModelInteractor;
24
+ contextLength(contextLength: ContextLength): ChatModelInteractor;
25
+ samplingSeed(samplingSeed: SamplingSeed): ChatModelInteractor;
26
+ session(): ChatSessionInteractor;
27
27
  reply(text: string, progress?: (partialOutput: Output) => boolean): Promise<Output>;
28
28
  replyToMessages(messages: Message[], progress?: (partialOutput: Output) => boolean): Promise<Output>;
29
29
  }
30
- //# sourceMappingURL=modelInteractor.d.ts.map
30
+ //# sourceMappingURL=chatModelInteractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/chatModelInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE;OACb,EAAE,MAAM,EAAE;OACV,EAAE,aAAa,EAAE;OACjB,EAAE,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 -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModelInteractor = void 0;
3
+ exports.ChatModelInteractor = void 0;
4
4
  const downloadState_1 = require("../bridging/downloadState.js");
5
5
  const modelType_1 = require("../bridging/modelType.js");
6
6
  const runConfig_1 = require("../bridging/runConfig.js");
7
+ const chatSessionInteractor_1 = require("./chatSessionInteractor.js");
7
8
  const downloadInteractor_1 = require("./downloadInteractor.js");
8
- const sessionInteractor_1 = require("./sessionInteractor.js");
9
- class ModelInteractor {
9
+ class ChatModelInteractor {
10
10
  constructor(modelsInteractor, model, config) {
11
11
  this.modelsInteractor = modelsInteractor;
12
12
  this.entity = model;
@@ -20,7 +20,7 @@ class ModelInteractor {
20
20
  const handlePromise = (async () => {
21
21
  const model = await this.finalize();
22
22
  const engine = await this.modelsInteractor.engineInteractor.finalize();
23
- const handle = engine.downloadHandle(model);
23
+ const handle = engine.downloadHandle(model.repoId);
24
24
  return handle;
25
25
  })();
26
26
  return new downloadInteractor_1.DownloadInteractor(this, handlePromise);
@@ -42,24 +42,24 @@ class ModelInteractor {
42
42
  }
43
43
  return this.finalize();
44
44
  })();
45
- return new ModelInteractor(this.modelsInteractor, modelPromise, this.config);
45
+ return new ChatModelInteractor(this.modelsInteractor, modelPromise, this.config);
46
46
  }
47
47
  /* Config */
48
48
  preset(preset) {
49
49
  const config = this.config.withPreset(preset);
50
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
50
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
51
51
  }
52
52
  prefillStepSize(prefillStepSize) {
53
53
  const config = this.config.withPrefillStepSize(prefillStepSize);
54
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
54
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
55
55
  }
56
56
  contextLength(contextLength) {
57
57
  const config = this.config.withContextLength(contextLength);
58
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
58
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
59
59
  }
60
60
  samplingSeed(samplingSeed) {
61
61
  const config = this.config.withSamplingSeed(samplingSeed);
62
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
62
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
63
63
  }
64
64
  /* Session */
65
65
  session() {
@@ -69,10 +69,10 @@ class ModelInteractor {
69
69
  if (model.type === modelType_1.ModelType.Local) {
70
70
  model = await this.download().finalize();
71
71
  }
72
- const session = engine.session(model, this.config);
72
+ const session = engine.chatSession(model, this.config);
73
73
  return session;
74
74
  })();
75
- return new sessionInteractor_1.SessionInteractor(this, sessionPromise, runConfig_1.RunConfig.default());
75
+ return new chatSessionInteractor_1.ChatSessionInteractor(this, sessionPromise, runConfig_1.RunConfig.default());
76
76
  }
77
77
  async reply(text, progress = () => true) {
78
78
  return await this.session().reply(text, progress);
@@ -81,5 +81,5 @@ class ModelInteractor {
81
81
  return await this.session().replyToMessages(messages, progress);
82
82
  }
83
83
  }
84
- exports.ModelInteractor = ModelInteractor;
85
- //# sourceMappingURL=modelInteractor.js.map
84
+ exports.ChatModelInteractor = ChatModelInteractor;
85
+ //# sourceMappingURL=chatModelInteractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelInteractor.js","sourceRoot":"","sources":["../src/interactors/chatModelInteractor.ts"],"names":[],"mappings":";;;AAIA,gEAA0D;AAE1D,wDAAkD;AAIlD,wDAAkD;AAGlD,sEAAgE;AAChE,gEAA0D;AAG1D,MAAa,mBAAmB;IAK5B,YAAY,gBAAsC,EAAE,KAAkC,EAAE,MAAc;QAClG,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,iBAAiB;IAEjB,WAAW;QAC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;YACvD,OAAO,OAAO,CAAC;QACnB,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,6CAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,qBAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC/E,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CACjB,QAAmB,EACnB,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;CACJ;AAhGD,kDAgGC"}
@@ -1,9 +1,9 @@
1
1
  import { DownloadPhase } from "../bridging/downloadState.mjs";
2
2
  import { ModelType } from "../bridging/modelType.mjs";
3
3
  import { RunConfig } from "../bridging/runConfig.mjs";
4
+ import { ChatSessionInteractor } from "./chatSessionInteractor.mjs";
4
5
  import { DownloadInteractor } from "./downloadInteractor.mjs";
5
- import { SessionInteractor } from "./sessionInteractor.mjs";
6
- export class ModelInteractor {
6
+ export class ChatModelInteractor {
7
7
  constructor(modelsInteractor, model, config) {
8
8
  this.modelsInteractor = modelsInteractor;
9
9
  this.entity = model;
@@ -17,7 +17,7 @@ export class ModelInteractor {
17
17
  const handlePromise = (async () => {
18
18
  const model = await this.finalize();
19
19
  const engine = await this.modelsInteractor.engineInteractor.finalize();
20
- const handle = engine.downloadHandle(model);
20
+ const handle = engine.downloadHandle(model.repoId);
21
21
  return handle;
22
22
  })();
23
23
  return new DownloadInteractor(this, handlePromise);
@@ -39,24 +39,24 @@ export class ModelInteractor {
39
39
  }
40
40
  return this.finalize();
41
41
  })();
42
- return new ModelInteractor(this.modelsInteractor, modelPromise, this.config);
42
+ return new ChatModelInteractor(this.modelsInteractor, modelPromise, this.config);
43
43
  }
44
44
  /* Config */
45
45
  preset(preset) {
46
46
  const config = this.config.withPreset(preset);
47
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
47
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
48
48
  }
49
49
  prefillStepSize(prefillStepSize) {
50
50
  const config = this.config.withPrefillStepSize(prefillStepSize);
51
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
51
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
52
52
  }
53
53
  contextLength(contextLength) {
54
54
  const config = this.config.withContextLength(contextLength);
55
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
55
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
56
56
  }
57
57
  samplingSeed(samplingSeed) {
58
58
  const config = this.config.withSamplingSeed(samplingSeed);
59
- return new ModelInteractor(this.modelsInteractor, this.entity, config);
59
+ return new ChatModelInteractor(this.modelsInteractor, this.entity, config);
60
60
  }
61
61
  /* Session */
62
62
  session() {
@@ -66,10 +66,10 @@ export class ModelInteractor {
66
66
  if (model.type === ModelType.Local) {
67
67
  model = await this.download().finalize();
68
68
  }
69
- const session = engine.session(model, this.config);
69
+ const session = engine.chatSession(model, this.config);
70
70
  return session;
71
71
  })();
72
- return new SessionInteractor(this, sessionPromise, RunConfig.default());
72
+ return new ChatSessionInteractor(this, sessionPromise, RunConfig.default());
73
73
  }
74
74
  async reply(text, progress = () => true) {
75
75
  return await this.session().reply(text, progress);
@@ -78,4 +78,4 @@ export class ModelInteractor {
78
78
  return await this.session().replyToMessages(messages, progress);
79
79
  }
80
80
  }
81
- //# sourceMappingURL=modelInteractor.mjs.map
81
+ //# sourceMappingURL=chatModelInteractor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelInteractor.mjs","sourceRoot":"","sources":["../src/interactors/chatModelInteractor.ts"],"names":[],"mappings":"OAIO,EAAE,aAAa,EAAE;OAEjB,EAAE,SAAS,EAAE;OAI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AC/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAEvE,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,KAAK,EAAE,CAAC;gBACjC,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC7C,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACvD,OAAO,OAAO,CAAC;QACnB,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,WAA+C,GAAG,EAAE,CAAC,IAAI;QAC/E,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CACjB,QAAmB,EACnB,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;CACJ"}
@@ -0,0 +1,12 @@
1
+ import { ChatModel } from "../bridging/chatModel.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<ChatModel[]> {
6
+ readonly engineInteractor: EngineInteractor;
7
+ readonly entity: InteractorEntity<ChatModel[]>;
8
+ constructor(engineInteractor: EngineInteractor, models: InteractorEntity<ChatModel[]>);
9
+ finalize(): Promise<ChatModel[]>;
10
+ get(repoId: string): ChatModelInteractor;
11
+ }
12
+ //# sourceMappingURL=chatModelsInteractor.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelsInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE;OAGb,EAAE,mBAAmB,EAAE;OACvB,EAAE,gBAAgB,EAAE;OACpB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,oBAAqB,YAAW,UAAU,CAAC,SAAS,EAAE,CAAC;IAChE,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC;gBAEnC,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC;IAK/E,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAItC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAQ3C"}
@@ -0,0 +1,12 @@
1
+ import { ChatModel } from "../bridging/chatModel.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<ChatModel[]> {
6
+ readonly engineInteractor: EngineInteractor;
7
+ readonly entity: InteractorEntity<ChatModel[]>;
8
+ constructor(engineInteractor: EngineInteractor, models: InteractorEntity<ChatModel[]>);
9
+ finalize(): Promise<ChatModel[]>;
10
+ get(repoId: string): ChatModelInteractor;
11
+ }
12
+ //# sourceMappingURL=chatModelsInteractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelsInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE;OAGb,EAAE,mBAAmB,EAAE;OACvB,EAAE,gBAAgB,EAAE;OACpB,EAAE,UAAU,EAAE,gBAAgB,EAAE;AAEvC,qBAAa,oBAAqB,YAAW,UAAU,CAAC,SAAS,EAAE,CAAC;IAChE,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC;gBAEnC,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC;IAK/E,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAItC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAQ3C"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModelsInteractor = void 0;
3
+ exports.ChatModelsInteractor = void 0;
4
4
  const config_1 = require("../bridging/config.js");
5
5
  const error_1 = require("../error.js");
6
- const modelInteractor_1 = require("./modelInteractor.js");
7
- class ModelsInteractor {
6
+ const chatModelInteractor_1 = require("./chatModelInteractor.js");
7
+ class ChatModelsInteractor {
8
8
  constructor(engineInteractor, models) {
9
9
  this.engineInteractor = engineInteractor;
10
10
  this.entity = models;
@@ -18,8 +18,8 @@ class ModelsInteractor {
18
18
  const model = models.find((model) => model.repoId === repoId);
19
19
  return (0, error_1.unwrapOrThrow)(model, error_1.EngineErrorCode.ModelNotFound);
20
20
  })();
21
- return new modelInteractor_1.ModelInteractor(this, modelPromise, config_1.Config.default());
21
+ return new chatModelInteractor_1.ChatModelInteractor(this, modelPromise, config_1.Config.default());
22
22
  }
23
23
  }
24
- exports.ModelsInteractor = ModelsInteractor;
25
- //# sourceMappingURL=modelsInteractor.js.map
24
+ exports.ChatModelsInteractor = ChatModelsInteractor;
25
+ //# sourceMappingURL=chatModelsInteractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelsInteractor.js","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":";;;AACA,kDAA4C;AAC5C,uCAA0D;AAC1D,kEAA4D;AAI5D,MAAa,oBAAoB;IAI7B,YAAY,gBAAkC,EAAE,MAAqC;QACjF,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,7 +1,7 @@
1
1
  import { Config } from "../bridging/config.mjs";
2
2
  import { EngineErrorCode, unwrapOrThrow } from "../error.mjs";
3
- import { ModelInteractor } from "./modelInteractor.mjs";
4
- export class ModelsInteractor {
3
+ import { ChatModelInteractor } from "./chatModelInteractor.mjs";
4
+ export class ChatModelsInteractor {
5
5
  constructor(engineInteractor, models) {
6
6
  this.engineInteractor = engineInteractor;
7
7
  this.entity = models;
@@ -15,7 +15,7 @@ export class ModelsInteractor {
15
15
  const model = models.find((model) => model.repoId === repoId);
16
16
  return unwrapOrThrow(model, EngineErrorCode.ModelNotFound);
17
17
  })();
18
- return new ModelInteractor(this, modelPromise, Config.default());
18
+ return new ChatModelInteractor(this, modelPromise, Config.default());
19
19
  }
20
20
  }
21
- //# sourceMappingURL=modelsInteractor.mjs.map
21
+ //# sourceMappingURL=chatModelsInteractor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatModelsInteractor.mjs","sourceRoot":"","sources":["../src/interactors/chatModelsInteractor.ts"],"names":[],"mappings":"OACO,EAAE,MAAM,EAAE;OACV,EAAE,eAAe,EAAE,aAAa,EAAE;OAClC,EAAE,mBAAmB,EAAE;AAI9B,MAAM,OAAO,oBAAoB;IAI7B,YAAY,gBAAkC,EAAE,MAAqC;QACjF,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"}
@@ -0,0 +1,24 @@
1
+ import { ChatSession } from "../bridging/chatSession.mjs";
2
+ import { Input } from "../bridging/input.mjs";
3
+ import { Message } from "../bridging/message.mjs";
4
+ import { Output } from "../bridging/output.mjs";
5
+ import { RunConfig } from "../bridging/runConfig.mjs";
6
+ import { SamplingMethod } from "../bridging/samplingMethod.mjs";
7
+ import { SamplingPolicy } from "../bridging/samplingPolicy.mjs";
8
+ import { ChatModelInteractor } from "./chatModelInteractor.mjs";
9
+ import { Interactor, InteractorEntity } from "./interactor.mjs";
10
+ export declare class ChatSessionInteractor implements Interactor<ChatSession> {
11
+ readonly modelInteractor: ChatModelInteractor;
12
+ readonly entity: InteractorEntity<ChatSession>;
13
+ readonly config: RunConfig;
14
+ constructor(modelInteractor: ChatModelInteractor, session: InteractorEntity<ChatSession>, config: RunConfig);
15
+ finalize(): Promise<ChatSession>;
16
+ tokensLimit(tokensLimit: number): ChatSessionInteractor;
17
+ enableThinking(enableThinking: boolean): ChatSessionInteractor;
18
+ samplingPolicy(samplingPolicy: SamplingPolicy): ChatSessionInteractor;
19
+ samplingMethod(samplingMethod: SamplingMethod): ChatSessionInteractor;
20
+ run(input: Input, progress?: (partialOutput: Output) => boolean): Promise<Output>;
21
+ reply(text: string, progress?: (partialOutput: Output) => boolean): Promise<Output>;
22
+ replyToMessages(messages: Message[], progress?: (partialOutput: Output) => boolean): Promise<Output>;
23
+ }
24
+ //# sourceMappingURL=chatSessionInteractor.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionInteractor.d.mts","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;OACf,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;IAO/D,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"}
@@ -0,0 +1,24 @@
1
+ import { ChatSession } from "../bridging/chatSession.js";
2
+ import { Input } from "../bridging/input.js";
3
+ import { Message } from "../bridging/message.js";
4
+ import { Output } from "../bridging/output.js";
5
+ import { RunConfig } from "../bridging/runConfig.js";
6
+ import { SamplingMethod } from "../bridging/samplingMethod.js";
7
+ import { SamplingPolicy } from "../bridging/samplingPolicy.js";
8
+ import { ChatModelInteractor } from "./chatModelInteractor.js";
9
+ import { Interactor, InteractorEntity } from "./interactor.js";
10
+ export declare class ChatSessionInteractor implements Interactor<ChatSession> {
11
+ readonly modelInteractor: ChatModelInteractor;
12
+ readonly entity: InteractorEntity<ChatSession>;
13
+ readonly config: RunConfig;
14
+ constructor(modelInteractor: ChatModelInteractor, session: InteractorEntity<ChatSession>, config: RunConfig);
15
+ finalize(): Promise<ChatSession>;
16
+ tokensLimit(tokensLimit: number): ChatSessionInteractor;
17
+ enableThinking(enableThinking: boolean): ChatSessionInteractor;
18
+ samplingPolicy(samplingPolicy: SamplingPolicy): ChatSessionInteractor;
19
+ samplingMethod(samplingMethod: SamplingMethod): ChatSessionInteractor;
20
+ run(input: Input, progress?: (partialOutput: Output) => boolean): Promise<Output>;
21
+ reply(text: string, progress?: (partialOutput: Output) => boolean): Promise<Output>;
22
+ replyToMessages(messages: Message[], progress?: (partialOutput: Output) => boolean): Promise<Output>;
23
+ }
24
+ //# sourceMappingURL=chatSessionInteractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionInteractor.d.ts","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;OACf,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;IAO/D,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,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionInteractor = void 0;
3
+ exports.ChatSessionInteractor = void 0;
4
4
  const input_1 = require("../bridging/input.js");
5
5
  const samplingPolicy_1 = require("../bridging/samplingPolicy.js");
6
- class SessionInteractor {
6
+ class ChatSessionInteractor {
7
7
  constructor(modelInteractor, session, config) {
8
8
  this.modelInteractor = modelInteractor;
9
9
  this.entity = session;
@@ -15,19 +15,19 @@ class SessionInteractor {
15
15
  /* Config */
16
16
  tokensLimit(tokensLimit) {
17
17
  const config = this.config.withTokensLimit(tokensLimit);
18
- return new SessionInteractor(this.modelInteractor, this.entity, config);
18
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
19
19
  }
20
20
  enableThinking(enableThinking) {
21
21
  const config = this.config.withEnableThinking(enableThinking);
22
- return new SessionInteractor(this.modelInteractor, this.entity, config);
22
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
23
23
  }
24
24
  samplingPolicy(samplingPolicy) {
25
25
  const config = this.config.withSamplingPolicy(samplingPolicy);
26
- return new SessionInteractor(this.modelInteractor, this.entity, config);
26
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
27
27
  }
28
28
  samplingMethod(samplingMethod) {
29
29
  const config = this.config.withSamplingPolicy(samplingPolicy_1.SamplingPolicy.custom(samplingMethod));
30
- return new SessionInteractor(this.modelInteractor, this.entity, config);
30
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
31
31
  }
32
32
  /* Run */
33
33
  async run(input, progress = () => true) {
@@ -46,5 +46,5 @@ class SessionInteractor {
46
46
  return await this.run(input_1.Input.messages(messages), progress);
47
47
  }
48
48
  }
49
- exports.SessionInteractor = SessionInteractor;
50
- //# sourceMappingURL=sessionInteractor.js.map
49
+ exports.ChatSessionInteractor = ChatSessionInteractor;
50
+ //# sourceMappingURL=chatSessionInteractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionInteractor.js","sourceRoot":"","sources":["../src/interactors/chatSessionInteractor.ts"],"names":[],"mappings":";;;AACA,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,E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,IAAI,CAAC,GAAG,CAAC,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACJ;AA/DD,sDA+DC"}
@@ -1,6 +1,6 @@
1
1
  import { Input } from "../bridging/input.mjs";
2
2
  import { SamplingPolicy } from "../bridging/samplingPolicy.mjs";
3
- export class SessionInteractor {
3
+ export class ChatSessionInteractor {
4
4
  constructor(modelInteractor, session, config) {
5
5
  this.modelInteractor = modelInteractor;
6
6
  this.entity = session;
@@ -12,19 +12,19 @@ export class SessionInteractor {
12
12
  /* Config */
13
13
  tokensLimit(tokensLimit) {
14
14
  const config = this.config.withTokensLimit(tokensLimit);
15
- return new SessionInteractor(this.modelInteractor, this.entity, config);
15
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
16
16
  }
17
17
  enableThinking(enableThinking) {
18
18
  const config = this.config.withEnableThinking(enableThinking);
19
- return new SessionInteractor(this.modelInteractor, this.entity, config);
19
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
20
20
  }
21
21
  samplingPolicy(samplingPolicy) {
22
22
  const config = this.config.withSamplingPolicy(samplingPolicy);
23
- return new SessionInteractor(this.modelInteractor, this.entity, config);
23
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
24
24
  }
25
25
  samplingMethod(samplingMethod) {
26
26
  const config = this.config.withSamplingPolicy(SamplingPolicy.custom(samplingMethod));
27
- return new SessionInteractor(this.modelInteractor, this.entity, config);
27
+ return new ChatSessionInteractor(this.modelInteractor, this.entity, config);
28
28
  }
29
29
  /* Run */
30
30
  async run(input, progress = () => true) {
@@ -43,4 +43,4 @@ export class SessionInteractor {
43
43
  return await this.run(Input.messages(messages), progress);
44
44
  }
45
45
  }
46
- //# sourceMappingURL=sessionInteractor.mjs.map
46
+ //# sourceMappingURL=chatSessionInteractor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionInteractor.mjs","sourceRoot":"","sources":["../src/interactors/chatSess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,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,11 +1,11 @@
1
1
  import { DownloadHandle } from "../bridging/downloadHandle.mjs";
2
2
  import { DownloadProgressUpdate } from "../bridging/downloadProgressUpdate.mjs";
3
+ import { ChatModelInteractor } from "./chatModelInteractor.mjs";
3
4
  import { Interactor, InteractorEntity } from "./interactor.mjs";
4
- import { ModelInteractor } from "./modelInteractor.mjs";
5
5
  export declare class DownloadInteractor implements Interactor<DownloadHandle> {
6
- readonly modelInteractor: ModelInteractor;
6
+ readonly modelInteractor: ChatModelInteractor;
7
7
  readonly entity: InteractorEntity<DownloadHandle>;
8
- constructor(modelInteractor: ModelInteractor, handle: InteractorEntity<DownloadHandle>);
8
+ constructor(modelInteractor: ChatModelInteractor, handle: InteractorEntity<DownloadHandle>);
9
9
  finalize(): Promise<DownloadHandle>;
10
10
  resume(): DownloadInteractor;
11
11
  pause(): DownloadInteractor;
@@ -1 +1 @@
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,UAAU,EAAE,gBAAgB,EAAE;OAChC,EAAE,eAAe,EAAE;AAE1B,qBAAa,kBAAmB,YAAW,UAAU,CAAC,cAAc,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;gBAEtC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC;IAKhF,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
+ {"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,11 +1,11 @@
1
1
  import { DownloadHandle } from "../bridging/downloadHandle.js";
2
2
  import { DownloadProgressUpdate } from "../bridging/downloadProgressUpdate.js";
3
+ import { ChatModelInteractor } from "./chatModelInteractor.js";
3
4
  import { Interactor, InteractorEntity } from "./interactor.js";
4
- import { ModelInteractor } from "./modelInteractor.js";
5
5
  export declare class DownloadInteractor implements Interactor<DownloadHandle> {
6
- readonly modelInteractor: ModelInteractor;
6
+ readonly modelInteractor: ChatModelInteractor;
7
7
  readonly entity: InteractorEntity<DownloadHandle>;
8
- constructor(modelInteractor: ModelInteractor, handle: InteractorEntity<DownloadHandle>);
8
+ constructor(modelInteractor: ChatModelInteractor, handle: InteractorEntity<DownloadHandle>);
9
9
  finalize(): Promise<DownloadHandle>;
10
10
  resume(): DownloadInteractor;
11
11
  pause(): DownloadInteractor;
@@ -1 +1 @@
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,UAAU,EAAE,gBAAgB,EAAE;OAChC,EAAE,eAAe,EAAE;AAE1B,qBAAa,kBAAmB,YAAW,UAAU,CAAC,cAAc,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;gBAEtC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC;IAKhF,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
+ {"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 +1 @@
1
- {"version":3,"file":"downloadInteractor.js","sourceRoot":"","sources":["../src/interactors/downloadInteractor.ts"],"names":[],"mappings":";;;AAKA,MAAa,kBAAkB;IAI3B,YAAY,eAAgC,EAAE,MAAwC;QAClF,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,O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AC,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,18 +1,15 @@
1
1
  import { Engine } from "../bridging/engine.mjs";
2
- import { ModelKind } from "../bridging/model.mjs";
3
2
  import { ModelType } from "../bridging/modelType.mjs";
3
+ import { ChatModelInteractor } from "./chatModelInteractor.mjs";
4
+ import { ChatModelsInteractor } from "./chatModelsInteractor.mjs";
4
5
  import { Interactor, InteractorEntity } from "./interactor.mjs";
5
- import { ModelInteractor } from "./modelInteractor.mjs";
6
- import { ModelsInteractor } from "./modelsInteractor.mjs";
7
6
  export declare class EngineInteractor implements Interactor<Engine> {
8
7
  readonly entity: InteractorEntity<Engine>;
9
8
  readonly modelTypeFilter: ModelType[] | null;
10
- readonly modelKindFilter: ModelKind[] | null;
11
- constructor(engine: InteractorEntity<Engine>, modelTypeFilter?: ModelType[] | null, modelKindFilter?: ModelKind[] | null);
9
+ constructor(engine: InteractorEntity<Engine>, modelTypeFilter?: ModelType[] | null);
12
10
  finalize(): Promise<Engine>;
13
11
  filterTypes(types: ModelType[] | null): EngineInteractor;
14
- filterKinds(kinds: ModelKind[] | null): EngineInteractor;
15
- models(): ModelsInteractor;
16
- model(repoId: string): ModelInteractor;
12
+ chatModels(): ChatModelsInteractor;
13
+ chatModel(repoId: string): ChatModelInteractor;
17
14
  }
18
15
  //# sourceMappingURL=engineInteractor.d.mts.map
@@ -1 +1 @@
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,SAAS,EAAE;OACb,EAAE,UAAU,EAAE,gBAAgB,EAAE;OAChC,EAAE,eAAe,EAAE;OACnB,EAAE,gBAAgB,EAAE;AAE3B,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;IAC7C,QAAQ,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAGzC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW,EAC1C,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW;IAOxC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAMjC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,gBAAgB;IAIxD,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,gBAAgB;IAIxD,MAAM,IAAI,gBAAgB;IAQ1B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;CAIzC"}
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,18 +1,15 @@
1
1
  import { Engine } from "../bridging/engine.js";
2
- import { ModelKind } from "../bridging/model.js";
3
2
  import { ModelType } from "../bridging/modelType.js";
3
+ import { ChatModelInteractor } from "./chatModelInteractor.js";
4
+ import { ChatModelsInteractor } from "./chatModelsInteractor.js";
4
5
  import { Interactor, InteractorEntity } from "./interactor.js";
5
- import { ModelInteractor } from "./modelInteractor.js";
6
- import { ModelsInteractor } from "./modelsInteractor.js";
7
6
  export declare class EngineInteractor implements Interactor<Engine> {
8
7
  readonly entity: InteractorEntity<Engine>;
9
8
  readonly modelTypeFilter: ModelType[] | null;
10
- readonly modelKindFilter: ModelKind[] | null;
11
- constructor(engine: InteractorEntity<Engine>, modelTypeFilter?: ModelType[] | null, modelKindFilter?: ModelKind[] | null);
9
+ constructor(engine: InteractorEntity<Engine>, modelTypeFilter?: ModelType[] | null);
12
10
  finalize(): Promise<Engine>;
13
11
  filterTypes(types: ModelType[] | null): EngineInteractor;
14
- filterKinds(kinds: ModelKind[] | null): EngineInteractor;
15
- models(): ModelsInteractor;
16
- model(repoId: string): ModelInteractor;
12
+ chatModels(): ChatModelsInteractor;
13
+ chatModel(repoId: string): ChatModelInteractor;
17
14
  }
18
15
  //# sourceMappingURL=engineInteractor.d.ts.map
@@ -1 +1 @@
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,SAAS,EAAE;OACb,EAAE,UAAU,EAAE,gBAAgB,EAAE;OAChC,EAAE,eAAe,EAAE;OACnB,EAAE,gBAAgB,EAAE;AAE3B,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;IAC7C,QAAQ,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAGzC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW,EAC1C,eAAe,GAAE,SAAS,EAAE,GAAG,IAAW;IAOxC,QAA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