Closed myudak closed 4 months ago
onFinish
was added in 3.1.15
. Can you confirm which exact versions of ai
and of @ai-sdk/openai
you are using?
I just tested it locally and it works, so it's most likely a version or deployment issue.
onFinish
was added in3.1.15
. Can you confirm which exact versions ofai
and of@ai-sdk/openai
you are using?
oh wow yeah i didnt know this must been the issue thank you
fixed it
Description
Currently running a bit of code in the onFinish handler of streamText on /api/chat. It's never called. The streaming works just fine but the handler isn't called.
i already copied from documentation and still doesn't work
Code example
Additional context
Running Next 14, App Router, Served on vercel, "ai": "^3.1.14",