@xsai/generate-text 0.3.0-beta.4 → 0.3.0-beta.6

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/index.js +2 -7
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { responseJSON } from '@xsai/shared';
1
+ import { trampoline, responseJSON } from '@xsai/shared';
2
2
  import { chat, determineStepType, executeTool } from '@xsai/shared-chat';
3
3
 
4
4
  const rawGenerateText = async (options) => chat({
@@ -79,11 +79,6 @@ const rawGenerateText = async (options) => chat({
79
79
  steps
80
80
  });
81
81
  });
82
- const generateText = async (options) => {
83
- let result = await rawGenerateText(options);
84
- while (typeof result === "function")
85
- result = await result();
86
- return result;
87
- };
82
+ const generateText = async (options) => trampoline(async () => rawGenerateText(options));
88
83
 
89
84
  export { generateText };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xsai/generate-text",
3
3
  "type": "module",
4
- "version": "0.3.0-beta.4",
4
+ "version": "0.3.0-beta.6",
5
5
  "description": "extra-small AI SDK.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",
@@ -29,12 +29,12 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@xsai/shared": "",
33
- "@xsai/shared-chat": ""
32
+ "@xsai/shared": "~0.3.0-beta.6",
33
+ "@xsai/shared-chat": "~0.3.0-beta.6"
34
34
  },
35
35
  "devDependencies": {
36
- "@xsai/tool": "",
37
- "valibot": "^1.0.0"
36
+ "valibot": "^1.0.0",
37
+ "@xsai/tool": "~0.3.0-beta.6"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "pkgroll",