Need help setting debounce to saving the user query

I make an api call with the query entered by user. Now if asks more than one query (like ‘Can I see my account balance?’ followed by ‘Can you tell me where do I check it?’) I want to wait for 10 seconds before making the api call with the first question. If there is a second question within 10 seconds I want to cancel the first call and place a new call with both the questions after again waiting for 10 seconds.
Any help would be appreciated.


Currently, the conversations will work in a flow like manner and so each input from the user needs to be collected as part of the flow.

If you’re asking the user to enter query1 after receiving the input — you will need to use a node and ask for query2. Alternatively, you’ll need to ask if the user has any more questions and store these responses in variables before passing it into your API.

We cannot actively listen and store user messages one after the other. We are working on making this more dynamic to handle such conversational nuances.

1 Like

Thanks for the reply! Totally get your point. Is there a way to access the javascript functions like setInterval inside the function bodies.?

Hey Kamlesh, were you trying to use GPT here, would you like to share with others how you plan on using it with