Skip to content
New issue

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

Provide complete steps responses in useChat onFinish #3125

Open
leonho opened this issue Sep 26, 2024 · 2 comments
Open

Provide complete steps responses in useChat onFinish #3125

leonho opened this issue Sep 26, 2024 · 2 comments
Labels
ai/ui enhancement New feature or request

Comments

@leonho
Copy link

leonho commented Sep 26, 2024

Feature Description

In the current useChat onFinish, for multi-step calls, only the final message is returned instead of including the tool responses and chat messages.

With server-side streamText now returning all steps, it could be beneficial to implement this in useChat as well.

Use Case

No response

Additional context

No response

@lgrammel lgrammel added enhancement New feature or request ai/ui labels Sep 27, 2024
@jonkurtis
Copy link

same issue here. when there is a multi-step server side tool call, onFinish only returns the final message which typically would not have the toolInvocation in it.

@nicoalbanese
Copy link
Contributor

Hey @leonho - you can access steps in the onFinish of useChat if you define the maxSteps within your useChat options rather than on the server. Would that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/ui enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants