ai 3.0.11 → 3.0.13
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/README.md +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/react/dist/index.d.mts +8 -4
- package/react/dist/index.d.ts +8 -4
- package/react/dist/index.js +2 -1
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +2 -1
- package/react/dist/index.mjs.map +1 -1
- package/rsc/dist/rsc-server.mjs +4 -0
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/README.md
CHANGED
@@ -26,7 +26,7 @@ This library is created by [Vercel](https://vercel.com) and [Next.js](https://ne
|
|
26
26
|
- Shu Ding ([@shuding\_](https://twitter.com/shuding_)) - [Vercel](https://vercel.com)
|
27
27
|
- Max Leiter ([@max_leiter](https://twitter.com/max_leiter)) - [Vercel](https://vercel.com)
|
28
28
|
- Malte Ubl ([@cramforce](https://twitter.com/cramforce)) - [Vercel](https://vercel.com)
|
29
|
-
- Justin Ridgewell ([@jridgewell](https://github.com/jridgewell))
|
29
|
+
- Justin Ridgewell ([@jridgewell](https://github.com/jridgewell))
|
30
30
|
|
31
31
|
[Contributors](https://github.com/vercel/ai/graphs/contributors)
|
32
32
|
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AssistantStream } from 'openai/lib/AssistantStream';
|
2
|
+
import { Run } from 'openai/resources/beta/threads/runs/runs';
|
2
3
|
import { ChatCompletionResponseChunk } from '@mistralai/mistralai';
|
3
4
|
import { ServerResponse } from 'node:http';
|
4
5
|
|
@@ -805,7 +806,7 @@ type AssistantResponseCallback = (options: {
|
|
805
806
|
messageId: string;
|
806
807
|
sendMessage: (message: AssistantMessage) => void;
|
807
808
|
sendDataMessage: (message: DataMessage) => void;
|
808
|
-
forwardStream: (stream: AssistantStream) => Promise<
|
809
|
+
forwardStream: (stream: AssistantStream) => Promise<Run | undefined>;
|
809
810
|
}) => Promise<void>;
|
810
811
|
declare function experimental_AssistantResponse({ threadId, messageId }: AssistantResponseSettings, process: AssistantResponseCallback): Response;
|
811
812
|
|
@@ -976,7 +977,7 @@ declare class experimental_StreamingReactResponse {
|
|
976
977
|
constructor(res: ReadableStream, options?: {
|
977
978
|
ui?: (message: {
|
978
979
|
content: string;
|
979
|
-
data?: JSONValue[]
|
980
|
+
data?: JSONValue[];
|
980
981
|
}) => UINode | Promise<UINode>;
|
981
982
|
data?: experimental_StreamData;
|
982
983
|
generateId?: IdGenerator;
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AssistantStream } from 'openai/lib/AssistantStream';
|
2
|
+
import { Run } from 'openai/resources/beta/threads/runs/runs';
|
2
3
|
import { ChatCompletionResponseChunk } from '@mistralai/mistralai';
|
3
4
|
import { ServerResponse } from 'node:http';
|
4
5
|
|
@@ -805,7 +806,7 @@ type AssistantResponseCallback = (options: {
|
|
805
806
|
messageId: string;
|
806
807
|
sendMessage: (message: AssistantMessage) => void;
|
807
808
|
sendDataMessage: (message: DataMessage) => void;
|
808
|
-
forwardStream: (stream: AssistantStream) => Promise<
|
809
|
+
forwardStream: (stream: AssistantStream) => Promise<Run | undefined>;
|
809
810
|
}) => Promise<void>;
|
810
811
|
declare function experimental_AssistantResponse({ threadId, messageId }: AssistantResponseSettings, process: AssistantResponseCallback): Response;
|
811
812
|
|
@@ -976,7 +977,7 @@ declare class experimental_StreamingReactResponse {
|
|
976
977
|
constructor(res: ReadableStream, options?: {
|
977
978
|
ui?: (message: {
|
978
979
|
content: string;
|
979
|
-
data?: JSONValue[]
|
980
|
+
data?: JSONValue[];
|
980
981
|
}) => UINode | Promise<UINode>;
|
981
982
|
data?: experimental_StreamData;
|
982
983
|
generateId?: IdGenerator;
|