I want to generate a massage to user when bot doing calculation so that user should know that Bot is doing some work and it will some time. how implement in my action file.
and a wait message should be like ("Please wait Bot is calculating ")
Hi, I am thinking this can be achieved through UI design where we can show that Bot is typing, but it will be more appropriate if we can display the wait message through action … hoping soon or later will get answers.
If you design your own UI, then yes you can simply put in some kind of loading animation to indicate the bot is typing or doing something. If you are using a prebuilt UI and can not edit the UI, then maybe just utter a message before the bot does any work ?
## example story
* example_intent
- utter_wait
- perform_action
utter_wait: "Please wait while i'm executing your order..."
thanks for the reply , the similar fashion i am thinking but challenge is hear how to call this ‘perform_action’ inside another action so that user should know that bot is busy with some calculation
I don’t think i understand you clearly. The ‘perform_action’ is an example for any of your custom action which require some calculation, therefore you put ‘utter_wait’ before it to inform the user that the bot is doing some work. What do you mean by calling ‘perform_action’ inside another action ?
sorry my bad for the not being clear, what i mean is that when we have created the the class inside that will call some function do it’s calculation for which my bot is taking time and till finish it’s calculation the user should get wait message. for that i am using utter_wait in any class of custom action which need sometime for calculation. But problem i am encountering is here that utter_wait and calculated answers both are displaying same time . exploring on this
Yes if you are doing it like this then that will happen, since the utters are sent in the same custom action. You should use utter_wait outside of your custom action, so the bot will send utter_wait first, then proceed to execute the custom action, like i suggest above. In all your stories which include your custom actions, put the utter_wait above them. You define utter_wait in domain.yml.