@ai.ntellect/core 0.0.36 → 0.0.37

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
@@ -15,7 +15,7 @@ export class Agent {
15
15
  private readonly memoryCache: MemoryCache | undefined;
16
16
  private readonly stream: boolean;
17
17
  private readonly maxEvaluatorIteration: number;
18
- private readonly evaluatorIteration = 0;
18
+ private evaluatorIteration = 0;
19
19
 
20
20
  constructor({
21
21
  user,
@@ -100,6 +100,7 @@ export class Agent {
100
100
  events.onMessage?.(evaluation);
101
101
 
102
102
  if (evaluation.nextActions.length > 0) {
103
+ this.evaluatorIteration++;
103
104
  return this.handleActions(
104
105
  {
105
106
  initialPrompt: contextualizedPrompt,
@@ -10,7 +10,7 @@ export declare class Agent {
10
10
  private readonly memoryCache;
11
11
  private readonly stream;
12
12
  private readonly maxEvaluatorIteration;
13
- private readonly evaluatorIteration;
13
+ private evaluatorIteration;
14
14
  constructor({ user, orchestrator, memoryCache, stream, maxEvaluatorIteration, }: {
15
15
  user: User;
16
16
  orchestrator: Orchestrator;
@@ -46,6 +46,7 @@ class Agent {
46
46
  const evaluation = await evaluator.process(initialPrompt, contextualizedPrompt, JSON.stringify(actionsResult.data));
47
47
  events.onMessage?.(evaluation);
48
48
  if (evaluation.nextActions.length > 0) {
49
+ this.evaluatorIteration++;
49
50
  return this.handleActions({
50
51
  initialPrompt: contextualizedPrompt,
51
52
  contextualizedPrompt: initialPrompt,
@@ -34,10 +34,15 @@ class Evaluator {
34
34
  parameters: action.parameters || {},
35
35
  })),
36
36
  };
37
+ console.log("Evaluator response");
38
+ console.dir(validatedResponse, { depth: null });
37
39
  return validatedResponse;
38
40
  }
39
41
  catch (error) {
40
42
  if (error) {
43
+ console.log("Evaluator error");
44
+ console.dir(error.value, { depth: null });
45
+ console.error(error.message);
41
46
  return {
42
47
  ...error.value,
43
48
  };
@@ -40,9 +40,14 @@ export class Evaluator {
40
40
  })),
41
41
  };
42
42
 
43
+ console.log("Evaluator response");
44
+ console.dir(validatedResponse, { depth: null });
43
45
  return validatedResponse;
44
46
  } catch (error: any) {
45
47
  if (error) {
48
+ console.log("Evaluator error");
49
+ console.dir(error.value, { depth: null });
50
+ console.error(error.message);
46
51
  return {
47
52
  ...error.value,
48
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai.ntellect/core",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {