Multiple assistant.ask or assistant.tell statement without user input
I needed a clarification since I am a stuck. When I give multiple assistant.ask statements, it displays only one and then waits for the user's response. Is there a way to send multiple statements to user? Let's say user asks for weather. I reply saying. "Sure, let me look up and find it out for you." Now, I make a API call to find the weather which is async. Then once I get the response, I want to send the response to the user "Here is the weather for the location...." So, in between two responses, there is no user input. Any way to do this?
You haven't indicated if you are using API.AI or the Actions API directly, but it sounds like you're using the Actions API. From your description, it sounds like you're writing the function linearly - as if you're expecting assistant.ask() to stop the program and wait for a reply from the user. This isn't how assistant.ask(), or Actions in general, work. Think of the Google Home as a web browser, and your Action will be running on a web server somewhere. assistant.ask() is equivalent to sending back a message to the browser and closing the connection (but not closing the microphone). There is no additional processing that can be done, so having statements after the ask() doesn't make sense. The assistant.ask() replies are, themselves, handled asynchronously. The program logic doesn't pause and wait for a reply - the replies are handled by a separate call to your program. If you're using the Actions API directly, you'll need to keep track of where in the conversation you are (the state - or what questions have been asked so far and what answers you've gotten) and execute different code paths appropriately. You may be more interested in API.AI, which lets you build the conversations more interactively and indicate only which commands will need to send your webhook the information. Using API.AI, your programming logic doesn't need to keep track of where in the conversation you are - you build the state machine and conversation path through API.AI. There is no way to send something unprompted through Actions right now. So the reply of "Sure, let me look that up for you" before looking up the information wouldn't be appropriate.
How to access the filled data when using Formflow Namespace in Skype Bot Framework?
Microsoft bot framework getting the users time zone
How to get credentials for the Direct Line API microsoft bot framework?
Telegram bots: How much API keys can I generate?
Weird rendering in “Fetch as Google”
Effective way of training the bot, language processing APIs
What would be the right way to ask the person to enter a city inside a bot?
What is the right way to save/track state inside a Facebook Messenger bot?
How to implement a chatbot to human executive switch using Microsoft Bot Framework?
How to stop or throttle bot traffic
Skype bot card images not showing up
Bot Framework - Sign-In Card, how get auth result
How to stop my telegram bot replying to a message multiple times
Empty message body in receive messages from telegram bot
Bot Framework Facebook Messenger Account Linking
Slack bot - using Botkit to clear old messages