@agent-smith/task 0.0.5 → 0.0.6
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/templates.js +5 -1
- package/package.json +3 -3
package/dist/templates.js
CHANGED
|
@@ -10,7 +10,7 @@ function formatTaskTemplate(taskDef, templateName) {
|
|
|
10
10
|
if ((!taskDef.model?.template)) {
|
|
11
11
|
const gt = tfm.guess(taskDef.model.name);
|
|
12
12
|
if (gt == "none") {
|
|
13
|
-
throw new Error(`Unable to guess the template for ${taskDef.model}: please provide a template in the
|
|
13
|
+
throw new Error(`Unable to guess the template for ${taskDef.model}: please provide a template name in the task definition`);
|
|
14
14
|
}
|
|
15
15
|
taskDef.model.template = gt;
|
|
16
16
|
}
|
|
@@ -25,6 +25,10 @@ function formatTaskTemplate(taskDef, templateName) {
|
|
|
25
25
|
if (taskDef.template?.assistant) {
|
|
26
26
|
tpl.afterAssistant(" " + taskDef.template.assistant);
|
|
27
27
|
}
|
|
28
|
+
if (taskDef.template?.stop) {
|
|
29
|
+
const tps = tpl?.stop ?? [];
|
|
30
|
+
tpl.stop = [...tps, ...taskDef.template.stop];
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
// model overrides
|
|
30
34
|
if (taskDef.model?.system) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-smith/task",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "A toolkit to create human friendly agents: the language model tasks module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"docs": "typedoc --entryPointStrategy expand"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@agent-smith/agent": "^0.0.
|
|
17
|
+
"@agent-smith/agent": "^0.0.7",
|
|
18
18
|
"@agent-smith/tfm": "^0.1.2",
|
|
19
19
|
"@locallm/api": "^0.5.1",
|
|
20
20
|
"modprompt": "^0.12.2",
|
|
@@ -25,7 +25,7 @@
|
|
|
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
|
-
"@types/node": "^24.9.
|
|
28
|
+
"@types/node": "^24.9.2",
|
|
29
29
|
"markdown-it-replace-link": "^1.2.2",
|
|
30
30
|
"restmix": "^0.5.0",
|
|
31
31
|
"rollup": "^4.52.5",
|