ai 3.1.24 → 3.1.26

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.mjs CHANGED
@@ -2755,7 +2755,9 @@ function toAIStream(stream, callbacks) {
2755
2755
  return stream.pipeThrough(
2756
2756
  new TransformStream({
2757
2757
  transform: async (chunk, controller) => {
2758
- if (typeof chunk.content === "string") {
2758
+ if (typeof chunk === "string") {
2759
+ controller.enqueue(chunk);
2760
+ } else if (typeof chunk.content === "string") {
2759
2761
  controller.enqueue(chunk.content);
2760
2762
  } else {
2761
2763
  const content = chunk.content;