@ai.ntellect/core 0.2.2 → 0.2.3
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.
package/agent/index.ts
CHANGED
@@ -48,6 +48,8 @@ export class Agent {
|
|
48
48
|
}
|
49
49
|
|
50
50
|
async process(prompt: string, events: AgentEvent): Promise<any> {
|
51
|
+
this.accumulatedResults = [];
|
52
|
+
this.evaluatorIteration = 0;
|
51
53
|
console.log("Requesting orchestrator for actions..");
|
52
54
|
const request = await this.orchestrator.process(
|
53
55
|
prompt,
|
@@ -170,9 +172,6 @@ export class Agent {
|
|
170
172
|
}
|
171
173
|
|
172
174
|
const accumulatedResults = this.accumulatedResults;
|
173
|
-
this.accumulatedResults = [];
|
174
|
-
this.evaluatorIteration = 0;
|
175
|
-
|
176
175
|
return this.stream
|
177
176
|
? (
|
178
177
|
await synthesizer.streamProcess(
|
package/dist/agent/index.js
CHANGED
@@ -19,6 +19,8 @@ class Agent {
|
|
19
19
|
this.accumulatedResults = [];
|
20
20
|
}
|
21
21
|
async process(prompt, events) {
|
22
|
+
this.accumulatedResults = [];
|
23
|
+
this.evaluatorIteration = 0;
|
22
24
|
console.log("Requesting orchestrator for actions..");
|
23
25
|
const request = await this.orchestrator.process(prompt, this.accumulatedResults);
|
24
26
|
events.onMessage?.(request);
|
@@ -86,8 +88,6 @@ class Agent {
|
|
86
88
|
}
|
87
89
|
}
|
88
90
|
const accumulatedResults = this.accumulatedResults;
|
89
|
-
this.accumulatedResults = [];
|
90
|
-
this.evaluatorIteration = 0;
|
91
91
|
return this.stream
|
92
92
|
? (await synthesizer.streamProcess(actionsResult.initialPrompt, accumulatedResults)).toDataStreamResponse()
|
93
93
|
: await synthesizer.process(actionsResult.initialPrompt, accumulatedResults);
|
@@ -43,6 +43,8 @@ class Evaluator {
|
|
43
43
|
const response = await (0, ai_1.generateObject)({
|
44
44
|
model: this.model,
|
45
45
|
schema: zod_1.z.object({
|
46
|
+
actionsCompleted: zod_1.z.array(zod_1.z.string()),
|
47
|
+
actionsFailed: zod_1.z.array(zod_1.z.string()),
|
46
48
|
isRemindNeeded: zod_1.z.boolean(),
|
47
49
|
importantToRemembers: zod_1.z.array(zod_1.z.object({
|
48
50
|
memoryType: zod_1.z.string(),
|
package/llm/evaluator/index.ts
CHANGED
@@ -50,6 +50,8 @@ export class Evaluator {
|
|
50
50
|
const response = await generateObject({
|
51
51
|
model: this.model,
|
52
52
|
schema: z.object({
|
53
|
+
actionsCompleted: z.array(z.string()),
|
54
|
+
actionsFailed: z.array(z.string()),
|
53
55
|
isRemindNeeded: z.boolean(),
|
54
56
|
importantToRemembers: z.array(
|
55
57
|
z.object({
|
package/llm/synthesizer/index.ts
CHANGED