ai 3.0.4 → 3.0.5

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.d.ts CHANGED
@@ -710,16 +710,22 @@ declare function AIStream(response: Response, customParser?: AIStreamParser, cal
710
710
  declare function readableFromAsyncIterable<T>(iterable: AsyncIterable<T>): ReadableStream<T>;
711
711
 
712
712
  interface CompletionChunk {
713
+ /**
714
+ * Unique object identifier.
715
+ *
716
+ * The format and length of IDs may change over time.
717
+ */
718
+ id: string;
713
719
  /**
714
720
  * The resulting completion up to and excluding the stop sequences.
715
721
  */
716
722
  completion: string;
717
723
  /**
718
- * The model that performed the completion.
724
+ * The model that handled the request.
719
725
  */
720
726
  model: string;
721
727
  /**
722
- * The reason that we stopped sampling.
728
+ * The reason that we stopped.
723
729
  *
724
730
  * This may be one the following values:
725
731
  *
@@ -727,7 +733,13 @@ interface CompletionChunk {
727
733
  * `stop_sequences` parameter, or a stop sequence built into the model
728
734
  * - `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum
729
735
  */
730
- stop_reason: string;
736
+ stop_reason: string | null;
737
+ /**
738
+ * Object type.
739
+ *
740
+ * For Text Completions, this is always `"completion"`.
741
+ */
742
+ type: 'completion';
731
743
  }
732
744
  interface Message {
733
745
  id: string;