Closed mrasoahaingo closed 8 hours ago
Hey @mrasoahaingo, thanks for opening an issue!
Based on your requirements, it sounds like this behavior can be achieved by switching over to useChat
and streamText
+ using maxSteps
along with some prompt engineering. streamUI
currently does not support multi-step tool calls.
I also imagine the system prompt to be:
You are a friendly assistant. You need to save two choices by asking the user two questions. The first choice is between A and B, while the second choice is between C and D.
So the flow ends up being like:
assistant: choose between A and B
user: A
assistant: great thank you! no choose between C and D
user: C
assistant: awesome, I've saved your responses
[!NOTE] You will have to write the system prompt in such a way that you assume the flow will have alternating
user
andassistant
messages.
Thanks, actually I want to use streamUI
so I will deal with it :)
Please note that we are moving away from streamUI
and putting it on pause for the near future. We recommend using ai sdk core + ui.
Oh 🥲 ... It will be deprected? just asking if I should rewrite my code now 😄
@mrasoahaingo There are several long-standing limitations with AI SDK RSC that have been causing pain for our users, and there are no good solutions in the near term: https://sdk.vercel.ai/docs/getting-started/navigating-the-library#when-to-use-ai-sdk-rsc
To avoid people running into these issues, we recommend using AI SDK UI. We may resume work on AI SDK RSC once there are paths to resolving the underlying limitations.
Feature Description
How do you manage the AI to continue the conversation when user doesn't need to respond after the tool response?
For example:
I want to make a tool which saves the user choice
The chat :
Then I want the assisant to continue the conversation
Use Case
No response
Additional context
No response