@xsai/stream-text 0.3.0-beta.5 → 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.
- package/dist/index.js +3 -9
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -33,19 +33,13 @@ const streamText = async (options) => {
|
|
|
33
33
|
let stepCtrl;
|
|
34
34
|
let textCtrl;
|
|
35
35
|
const chunkStream = new ReadableStream({
|
|
36
|
-
start(controller)
|
|
37
|
-
chunkCtrl = controller;
|
|
38
|
-
}
|
|
36
|
+
start: (controller) => chunkCtrl = controller
|
|
39
37
|
});
|
|
40
38
|
const stepStream = new ReadableStream({
|
|
41
|
-
start(controller)
|
|
42
|
-
stepCtrl = controller;
|
|
43
|
-
}
|
|
39
|
+
start: (controller) => stepCtrl = controller
|
|
44
40
|
});
|
|
45
41
|
const textStream = new ReadableStream({
|
|
46
|
-
start(controller)
|
|
47
|
-
textCtrl = controller;
|
|
48
|
-
}
|
|
42
|
+
start: (controller) => textCtrl = controller
|
|
49
43
|
});
|
|
50
44
|
const maxSteps = options.maxSteps ?? 1;
|
|
51
45
|
const decoder = new TextDecoder();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsai/stream-text",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.0-beta.
|
|
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-chat": "~0.3.0-beta.
|
|
32
|
+
"@xsai/shared-chat": "~0.3.0-beta.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"valibot": "^1.0.0",
|
|
36
|
-
"@xsai/shared": "~0.3.0-beta.
|
|
37
|
-
"@xsai/tool": "~0.3.0-beta.
|
|
36
|
+
"@xsai/shared": "~0.3.0-beta.6",
|
|
37
|
+
"@xsai/tool": "~0.3.0-beta.6"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "pkgroll",
|