ai icon indicating copy to clipboard operation
ai copied to clipboard

useObject now implements the onChunk callback option.

Open kosukeoya opened this issue 10 months ago • 0 comments

Background

Although onFinish is executed after all chunks have been read, there are cases where we want it to be executed every time a chunk is read.

Summary

Implemented onChunk callback on useObject and ran the test.

Verification

Tasks

  • [x] Tests have been added / updated (for bug fixes / features)
  • [x] Documentation has been added / updated (for bug fixes / features)
  • [ ] A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • [x] Formatting issues have been fixed (run pnpm prettier-fix in the project root)

Future Work

Related Issues

https://github.com/vercel/ai/issues/5965

kosukeoya avatar Apr 24 '25 15:04 kosukeoya