@ai.ntellect/core 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
package/agent/index.ts CHANGED
@@ -92,10 +92,10 @@ export class Agent {
92
92
  }
93
93
  );
94
94
 
95
- this.accumulatedResults = [
95
+ this.accumulatedResults = this.formatResults([
96
96
  ...this.accumulatedResults,
97
97
  ...actionsResult.data,
98
- ];
98
+ ]);
99
99
 
100
100
  const isOnChainAction = actions.some(
101
101
  (action) => action.type === "on-chain"
@@ -155,12 +155,12 @@ export class Agent {
155
155
  ? (
156
156
  await synthesizer.streamProcess(
157
157
  actionsResult.initialPrompt,
158
- this.formatResults(actionsResult.data)
158
+ actionsResult.data
159
159
  )
160
160
  ).toDataStreamResponse()
161
161
  : await synthesizer.process(
162
162
  actionsResult.initialPrompt,
163
- this.formatResults(actionsResult.data)
163
+ actionsResult.data
164
164
  );
165
165
  }
166
166
 
@@ -39,10 +39,10 @@ class Agent {
39
39
  onQueueComplete: events.onQueueComplete,
40
40
  onConfirmationRequired: events.onConfirmationRequired,
41
41
  });
42
- this.accumulatedResults = [
42
+ this.accumulatedResults = this.formatResults([
43
43
  ...this.accumulatedResults,
44
44
  ...actionsResult.data,
45
- ];
45
+ ]);
46
46
  const isOnChainAction = actions.some((action) => action.type === "on-chain");
47
47
  if (isOnChainAction) {
48
48
  return {
@@ -75,8 +75,8 @@ class Agent {
75
75
  async handleActionResults(actionsResult) {
76
76
  const synthesizer = new synthesizer_1.Synthesizer();
77
77
  return this.stream
78
- ? (await synthesizer.streamProcess(actionsResult.initialPrompt, this.formatResults(actionsResult.data))).toDataStreamResponse()
79
- : await synthesizer.process(actionsResult.initialPrompt, this.formatResults(actionsResult.data));
78
+ ? (await synthesizer.streamProcess(actionsResult.initialPrompt, actionsResult.data)).toDataStreamResponse()
79
+ : await synthesizer.process(actionsResult.initialPrompt, actionsResult.data);
80
80
  }
81
81
  transformActions(actions) {
82
82
  let predefinedActions = queue_item_transformer_1.QueueItemTransformer.transformActionsToQueueItems(actions) || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai.ntellect/core",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {