@agent-smith/task 0.1.3 → 0.1.5
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/dist/task.js +6 -2
- package/package.json +6 -6
package/dist/task.js
CHANGED
|
@@ -18,7 +18,7 @@ class Task {
|
|
|
18
18
|
//console.log("TASK CONF", conf);
|
|
19
19
|
//console.log("TOOLS", this.agent.tools);
|
|
20
20
|
if (!params?.prompt) {
|
|
21
|
-
throw new Error(
|
|
21
|
+
throw new Error(`Task ${this.def.name}: no prompt parameter provided. Parameters: ${params}`);
|
|
22
22
|
}
|
|
23
23
|
let model = this.def.model;
|
|
24
24
|
let ctx = this.def.ctx;
|
|
@@ -95,9 +95,13 @@ class Task {
|
|
|
95
95
|
answer = await this.agent.run(finalPrompt, this.def.inferParams, options);
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
+
//console.log("RUN AGENT (TASK) params:", this.def.inferParams);
|
|
99
|
+
//console.log("RUN AGENT (TASK) options:", options);
|
|
98
100
|
answer = await this.agent.run(finalPrompt, this.def.inferParams, options, tpl);
|
|
101
|
+
//console.log("RAW ANSWER", answer);
|
|
99
102
|
}
|
|
100
|
-
|
|
103
|
+
//console.log("TASK: ANSWER FINAL:", { answer: answer.result, errors: {}, template: answer.template })
|
|
104
|
+
return { answer, errors: {} };
|
|
101
105
|
}
|
|
102
106
|
addTools(tools) {
|
|
103
107
|
tools.forEach(t => this.agent.tools[t.name] = t);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-smith/task",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A toolkit to create human friendly agents: the language model tasks module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"docs": "typedoc --entryPointStrategy expand"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@agent-smith/agent": "^0.1.
|
|
17
|
+
"@agent-smith/agent": "^0.1.3",
|
|
18
18
|
"@agent-smith/tfm": "^0.2.0",
|
|
19
19
|
"modprompt": "^0.12.5",
|
|
20
20
|
"yaml": "^2.8.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"openai": "6.9.
|
|
24
|
-
"@locallm/types": "^0.
|
|
23
|
+
"openai": "6.9.1",
|
|
24
|
+
"@locallm/types": "^0.6.2",
|
|
25
25
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
26
26
|
"@rollup/plugin-terser": "^0.4.4",
|
|
27
27
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
28
28
|
"@types/node": "^24.10.1",
|
|
29
29
|
"markdown-it-replace-link": "^1.2.2",
|
|
30
|
-
"restmix": "^0.
|
|
31
|
-
"rollup": "^4.53.
|
|
30
|
+
"restmix": "^0.6.1",
|
|
31
|
+
"rollup": "^4.53.3",
|
|
32
32
|
"tslib": "^2.8.1",
|
|
33
33
|
"typedoc": "^0.28.14",
|
|
34
34
|
"typedoc-plugin-markdown": "^4.9.0",
|