@agent-smith/task 0.2.1 → 0.2.2

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 CHANGED
@@ -59,6 +59,7 @@ class Task {
59
59
  }
60
60
  }
61
61
  if (useTemplates) {
62
+ this.def.model = model;
62
63
  tpl = formatTaskTemplate(this.def, model?.template ? model.template : undefined);
63
64
  this.def.inferParams = formatInferParams(this.def.inferParams ?? {}, conf ?? {}, tpl);
64
65
  //tpl.replacePrompt(this.def.prompt);
package/dist/variables.js CHANGED
@@ -5,7 +5,7 @@ function applyVariables(taskDef, taskInput) {
5
5
  if (taskDef.variables?.required) {
6
6
  for (const name of Object.keys(taskDef.variables.required)) {
7
7
  if (!(name in taskInput)) {
8
- throw new Error(`The variable ${name} is required to run this taskDef`);
8
+ throw new Error(`The variable ${name} is required to run this task: variables: ${JSON.stringify(taskDef.variables, null, 2)}`);
9
9
  }
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-smith/task",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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.1.8",
17
+ "@agent-smith/agent": "^0.2.1",
18
18
  "@agent-smith/tfm": "^0.2.0",
19
19
  "modprompt": "^0.12.6",
20
20
  "yaml": "^2.8.2"