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/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
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.2",
4
+ "version": "2000.3.3",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.2",
4
+ "version": "2000.3.3",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",