@agent-smith/task 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/task.js +8 -4
  2. package/package.json +2 -2
package/dist/task.js CHANGED
@@ -30,9 +30,9 @@ class Task {
30
30
  ctx = model.ctx;
31
31
  }
32
32
  }
33
- else {
34
- throw new Error("No model found in task");
35
- }
33
+ /*else {
34
+ throw new Error("No model found in task")
35
+ }*/
36
36
  }
37
37
  //console.log("CONF", conf)
38
38
  if (this.agent.lm.providerType == "ollama") {
@@ -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
- return { answer: answer.result, errors: {}, template: answer.template };
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.2",
3
+ "version": "0.1.4",
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.2",
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"