Is there any reason that there's no 'finishReason' on useChat hook? #9780
Replies: 2 comments 1 reply
-
|
You can control the message metadata (since you may not want to expose the finish reason to the user). If you need it, you can it via message metadata, but this is good feedback and may be worth adding by default. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
This discussion was automatically locked because it has not been updated in over 30 days. If you still have questions about this topic, please ask us at community.vercel.com/ai-sdk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
During making an application with this library, I wanted to retrieve 'finish reason' but I couldn't find something like this especially on useChat hook.
I think it's so necessary for many use cases but couldn't find for my case after reading all the documents.
So I ended up with an workaround which used createUIMessageStream on server and added custom 'finish-reason' type data for returning data.
Is there something I missed?
If not, I want to know is there any reason for this and would like to contribute for this feature if there's no reason.
Beta Was this translation helpful? Give feedback.
All reactions