@ai.ntellect/core 0.1.94 → 0.1.96
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 +10 -11
- package/llm/orchestrator/context.ts +2 -1
- package/package.json +1 -1
package/agent/index.ts
CHANGED
@@ -78,6 +78,16 @@ export class Agent {
|
|
78
78
|
);
|
79
79
|
events.onMessage?.(request);
|
80
80
|
|
81
|
+
const isOnChainAction = request.actions.some(
|
82
|
+
(action) => action.type === "on-chain"
|
83
|
+
);
|
84
|
+
|
85
|
+
if (isOnChainAction) {
|
86
|
+
return {
|
87
|
+
data: this.accumulatedResults,
|
88
|
+
initialPrompt: prompt,
|
89
|
+
};
|
90
|
+
}
|
81
91
|
return request.actions.length > 0
|
82
92
|
? this.handleActions(
|
83
93
|
{
|
@@ -120,22 +130,11 @@ export class Agent {
|
|
120
130
|
}
|
121
131
|
);
|
122
132
|
|
123
|
-
const isOnChainAction = actions.some(
|
124
|
-
(action) => action.type === "on-chain"
|
125
|
-
);
|
126
|
-
|
127
133
|
this.accumulatedResults = [
|
128
134
|
...this.accumulatedResults,
|
129
135
|
...actionsResult.data,
|
130
136
|
];
|
131
137
|
|
132
|
-
if (isOnChainAction) {
|
133
|
-
return {
|
134
|
-
data: this.accumulatedResults,
|
135
|
-
initialPrompt,
|
136
|
-
};
|
137
|
-
}
|
138
|
-
|
139
138
|
if (this.evaluatorIteration >= this.maxEvaluatorIteration) {
|
140
139
|
return this.handleActionResults({
|
141
140
|
data: this.accumulatedResults,
|
@@ -7,7 +7,8 @@ export const orchestratorContext = {
|
|
7
7
|
"If there is no action to do, you must answer in the 'answer' field.",
|
8
8
|
"If some parameters are not clear or missing, don't add the action, YOU MUST ask the user for them.",
|
9
9
|
"ALWAYS use the same language as user request. (If it's English, use English, if it's French, use French, etc.)",
|
10
|
-
"For QUESTIONS or ANALYSIS,
|
10
|
+
"For QUESTIONS or ANALYSIS, you CAN search in memory and internal knowledge base.",
|
11
|
+
"For ON-CHAIN actions, just use the useful actions.",
|
11
12
|
"NEVER repeat same actions if the user doesn't ask for it.",
|
12
13
|
],
|
13
14
|
warnings: [],
|