We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onFinish
useChat
Currently running a bit of code in the onFinish handler of useChat. It's never called. The streaming works just fine but the handler isn't called.
Here you can see the specific line where we would get a console log if it were running: https://github.com/Frostwork-Media/back-of-the-envelope/blob/19a3e1fdf3d24b36206b01fcc1c1c9088c88b4db/src/app/_components/Chat.tsx#L30-L31
You can test it for yourself at https://backoftheenvelope.app/ or pull the code and try locally.
const { messages, input, handleInputChange, handleSubmit, isLoading, setMessages, reload, } = useChat({ onFinish() { console.log("onFinish() ran."); }, });
Running Next 14, App Router, Served on vercel, running with bun Repository: https://github.com/Frostwork-Media/back-of-the-envelope Public URL: https://backoftheenvelope.app/
bun
The text was updated successfully, but these errors were encountered:
I'm having the same issue on 3.0.22, Sveltekit. onFinish and onResponse is not firing at all.
onResponse
Downgraded to 3.0.19 and that seems to work.
Sorry, something went wrong.
I'm having the same issue on 3.0.22, Sveltekit. onFinish and onResponse is not firing at all. Downgraded to 3.0.19 and that seems to work.
In my case, the same issue on 3.0.22, and 3.0.19 is work. Ask for help: are there any incompatible changes?
3.0.22
3.0.19
This is potentially a duplicate of #1316
You can check out #1316 (comment) for upgrade instructions.
me too the onFinish in nextjs 14 doesnt work
No branches or pull requests
Description
Currently running a bit of code in the
onFinish
handler ofuseChat
. It's never called. The streaming works just fine but the handler isn't called.Here you can see the specific line where we would get a console log if it were running:
https://github.com/Frostwork-Media/back-of-the-envelope/blob/19a3e1fdf3d24b36206b01fcc1c1c9088c88b4db/src/app/_components/Chat.tsx#L30-L31
You can test it for yourself at https://backoftheenvelope.app/ or pull the code and try locally.
Code example
Additional context
Running Next 14, App Router, Served on vercel, running with
bun
Repository: https://github.com/Frostwork-Media/back-of-the-envelope
Public URL: https://backoftheenvelope.app/
The text was updated successfully, but these errors were encountered: