@xsai/stream-text 0.0.18 → 0.0.20

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.d.ts +3 -2
  2. package/package.json +8 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { ChatCompletionOptions, FinishReason } from '@xsai/shared-chat-completion';
2
2
 
3
3
  interface StreamTextOptions extends ChatCompletionOptions {
4
+ /** if you want to disable stream, use `@xsai/generate-text` */
5
+ stream?: never;
4
6
  streamOptions?: {
5
7
  /**
6
8
  * Return usage.
@@ -38,8 +40,7 @@ interface StreamTextResponse {
38
40
  usage?: StreamTextResponseUsage;
39
41
  }
40
42
  /**
41
- * @experimental
42
- * WIP, currently only returns `textStream`, does not support function calling (tools).
43
+ * @experimental WIP, does not support function calling (tools).
43
44
  */
44
45
  declare const streamText: (options: StreamTextOptions) => Promise<StreamTextResult>;
45
46
 
package/package.json CHANGED
@@ -1,16 +1,23 @@
1
1
  {
2
2
  "name": "@xsai/stream-text",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "type": "module",
5
5
  "author": "Moeru AI",
6
6
  "license": "MIT",
7
7
  "homepage": "https://xsai.js.org",
8
+ "description": "extra-small AI SDK for Browser, Node.js, Deno, Bun or Edge Runtime.",
9
+ "keywords": [
10
+ "xsai",
11
+ "openai",
12
+ "ai"
13
+ ],
8
14
  "repository": {
9
15
  "type": "git",
10
16
  "url": "git+https://github.com/moeru-ai/xsai.git",
11
17
  "directory": "packages/stream-text"
12
18
  },
13
19
  "bugs": "https://github.com/moeru-ai/xsai/issues",
20
+ "sideEffects": false,
14
21
  "main": "./dist/index.js",
15
22
  "types": "./dist/index.d.ts",
16
23
  "exports": {