@agent-smith/agent 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/agent.js +9 -9
- package/package.json +9 -8
package/dist/agent.js
CHANGED
|
@@ -162,21 +162,21 @@ class Agent {
|
|
|
162
162
|
final = finalAnswer;
|
|
163
163
|
}
|
|
164
164
|
if (it == 1) {
|
|
165
|
+
const turn = {};
|
|
165
166
|
if (thinking.length > 0) {
|
|
166
|
-
|
|
167
|
+
turn.think = thinking;
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
});
|
|
169
|
+
turn.user = prompt.replace("{prompt}", prompt);
|
|
170
|
+
turn.assistant = final;
|
|
171
|
+
tpl.pushToHistory(turn);
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
|
+
const turn = {};
|
|
174
175
|
if (thinking.length > 0) {
|
|
175
|
-
|
|
176
|
+
turn.think = thinking;
|
|
176
177
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
});
|
|
178
|
+
turn.assistant = final;
|
|
179
|
+
tpl.pushToHistory(turn);
|
|
180
180
|
}
|
|
181
181
|
this.history = tpl.history;
|
|
182
182
|
return res;
|
package/package.json
CHANGED
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/synw/agent-smith.git"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.5",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"buildrl": "rm -rf dist/* && rollup -c",
|
|
11
11
|
"build": "rm -rf dist/* && tsc"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@locallm/api": "^0.
|
|
15
|
-
"modprompt": "^0.12.
|
|
16
|
-
"restmix": "^0.
|
|
14
|
+
"@locallm/api": "^0.7.2",
|
|
15
|
+
"modprompt": "^0.12.6",
|
|
16
|
+
"restmix": "^0.6.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@locallm/types": "^0.
|
|
19
|
+
"@locallm/types": "^0.6.4",
|
|
20
20
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
21
21
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
22
|
-
"@types/node": "^
|
|
23
|
-
"
|
|
22
|
+
"@types/node": "^25.0.1",
|
|
23
|
+
"openai": "^6.10.0",
|
|
24
|
+
"rollup": "^4.53.3",
|
|
24
25
|
"ts-node": "^10.9.2",
|
|
25
26
|
"tslib": "2.8.1",
|
|
26
27
|
"typescript": "^5.9.3"
|
|
@@ -40,4 +41,4 @@
|
|
|
40
41
|
"registry": "https://registry.npmjs.org/"
|
|
41
42
|
},
|
|
42
43
|
"license": "MIT"
|
|
43
|
-
}
|
|
44
|
+
}
|