Load tool data and wait for user input (execute + addToolResult) #4835
mattmueller-stripe
started this conversation in
Ideas & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks, I'm building a product catalog tool.
It roughly looks like this:
Once I display the catalog, I'd like to give users an opportunity to select an item from that catalog. However when you call
execute
it continues the conversation.I'd like the chat wait for user input before continuing. I was able to get it to this working with some prompt engineering, roughly what you do here:
https://github.com/vercel/ai-chatbot/blob/01f589b6031a5fbbc2f844e2b0534249eb700058/lib/ai/prompts.ts#L8-L31
Which feels pretty hacky. Any better ways of doing this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions