utilitas 2000.3.2 → 2000.3.3
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/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +6 -2
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -334,7 +334,10 @@ const tools = [
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
},
|
|
337
|
-
func: async args => await search(args?.keyword
|
|
337
|
+
func: async args => await search(args?.keyword, {
|
|
338
|
+
num: args?.num || 10, start: args?.start || 1,
|
|
339
|
+
image: args?.image || false
|
|
340
|
+
}),
|
|
338
341
|
showReq: true, replaced: ONLINE, depend: checkSearch,
|
|
339
342
|
},
|
|
340
343
|
];
|
|
@@ -752,7 +755,8 @@ const handleToolsCall = async (msg, options) => {
|
|
|
752
755
|
if (calls.length) {
|
|
753
756
|
preRes.push(msg);
|
|
754
757
|
for (const fn of calls) {
|
|
755
|
-
input = fn?.functionCall?.args;
|
|
758
|
+
input = fn?.functionCall?.args || fn?.function?.arguments;
|
|
759
|
+
String.isString(input) && (input = parseJson(input, {}));
|
|
756
760
|
packMsg = (t, e) => ({
|
|
757
761
|
role: 'tool',
|
|
758
762
|
tool_call_id: fn.id,
|
package/lib/manifest.mjs
CHANGED