-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Description
Description
consumeStream({
stream: serverStream,
onError: async (error) => {
// Manually calling abort here
},
});
Using customStream to manually consume the stream and check for errors. Does customStream automatically call the onFinish handler, or do I need to invoke it manually inside the onError callback ?
Also, is it possible to call an abort function inside customStream ? When the stream errors out, shouldn’t it automatically stop making the manual call useless ?
AI SDK Version
ai: ^6.0.0-beta.98
Code of Conduct
- I agree to follow this project's Code of Conduct