ai 3.0.12 → 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 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)) - [Vercel](https://vercel.com)
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<any>;
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[] | undefined;
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<any>;
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[] | undefined;
980
+ data?: JSONValue[];
980
981
  }) => UINode | Promise<UINode>;
981
982
  data?: experimental_StreamData;
982
983
  generateId?: IdGenerator;