Open bernaferrari opened 2 months ago
@bernaferrari I don't want to hardcode something like reasoning, but I'd love to figure out a more flexible way to support array streaming. One thought that I had is to use a validator schema for intermediate results (partial result would only be sent if they pass that schema), but this will not solve the "is-object-completed" issue. The "is-object-completed" detection is tricky, because it needs to be specified to which level it applies to. Lmk if you have ideas.
Feature Description
Sequel to https://github.com/vercel/ai/issues/1486.
I wish I could have a reason field before the array, so that if I had
The array would stream in chunks and work with
array
but still allow other fields that are not array. So, ideally,z.array
=> stream in chunks (current behavior)Could also be like "if something is inside an array, wait for it to finish to stream, else stream naturally"