vercel / ai

Build AI-powered applications with React, Svelte, Vue, and Solid

Home Page:https://sdk.vercel.ai/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onFinish callback for experimental_useObject

clasnake opened this issue · comments

Feature Description

Is is possible to add an onFinish callback for experimental_useObject so that we can add custom logic at client side when the stream finishes? There is the onError callback on client side, onFinish callback on server side for streamObject, but I can't find onFinish on client side.

Use Case

Perform custom actions when the stream completes, e.g., url redirecting, client logs, etc

Additional context

No response

Duplicates #2289