@agent-smith/cli 0.0.89 → 0.0.91
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.
|
@@ -62,23 +62,15 @@ function configureTaskModel(itConf, taskSpec) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
+
if (!taskSpec?.model) {
|
|
66
|
+
throw new Error(`No model found: either specify a model in the task or use the -m flag`);
|
|
67
|
+
}
|
|
65
68
|
model = taskSpec.model;
|
|
66
69
|
foundModel = true;
|
|
67
70
|
}
|
|
68
71
|
if (!foundModel) {
|
|
69
72
|
throw new Error(`No model found in task`);
|
|
70
73
|
}
|
|
71
|
-
if (!foundTemplate) {
|
|
72
|
-
const gt = tfm.guess(model.name);
|
|
73
|
-
if (gt == "none") {
|
|
74
|
-
throw new Error(`Unable to guess the template for ${model.name}: please provide a template name: --tpl templatename`);
|
|
75
|
-
}
|
|
76
|
-
model.template = gt;
|
|
77
|
-
foundTemplate = true;
|
|
78
|
-
}
|
|
79
|
-
if (!model?.template) {
|
|
80
|
-
throw new Error(`No template found`);
|
|
81
|
-
}
|
|
82
74
|
if (!model?.ctx || !isModelFromTaskFile) {
|
|
83
75
|
model.ctx = taskSpec.ctx;
|
|
84
76
|
}
|
|
@@ -17,9 +17,6 @@ async function readTask(name, payload, options, agent) {
|
|
|
17
17
|
const taskFileSpec = openTaskSpec(name);
|
|
18
18
|
const opts = payload?.inferParams ? { ...options, ...payload.inferParams } : options;
|
|
19
19
|
const conf = parseTaskConfigOptions(opts);
|
|
20
|
-
if (!conf?.model) {
|
|
21
|
-
throw new Error(`No model found: either specify a model in the task or use the -m flag`);
|
|
22
|
-
}
|
|
23
20
|
if (options?.debug) {
|
|
24
21
|
console.log("conf:", conf);
|
|
25
22
|
conf.debug = true;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@agent-smith/cli",
|
|
3
3
|
"description": "Agent Smith: terminal client for language model agents",
|
|
4
4
|
"repository": "https://github.com/synw/agent-smith",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.91",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"buildrl": "rm -rf dist/* && rollup -c",
|
|
8
8
|
"build": "rm -rf dist/* && tsc",
|