Hi everyone,
i have some issue when develop my chatbot to order lunch
in form action, i have 3 variables : lunch_num_slot, date, location.
when bot ask the user: “which location do you want”. if user answer a chitchat like: “adsfasd//ss@%#&”. My bot wil be die and user cannot restart the bot. Can you help me
error: Encountered an exception while running action ‘order_lunch_time_form’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
hello huy,
in the command line . The error log is :
error: Encountered an exception while running action ‘order_lunch_time_form’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information
i dont understand why user chat some think like : “asdfa@$#@!32”. Bot is die and cannot understand any input from user. Can you help me
To ensure the bot logic flows in its planned path, you will need to declare some possible pausing of form, ending of forms or even ignoring forms in the middle of a convo. Don’t make a single story too long
You need to have more cases in your stories that’s what I would guess.
May I know how many cases are there for your form stories and other trivial convos?
oh. Action server have no attention. And of course i run the action server before testing the bot
Huy bui. Can you send me your email address . i can ask you in vietnamese to solve more issue. i’m newbie in rasa chatbot
So there is no error log from the action server cmd line, that’s weird. Normally when you encountered an Exception, there will be information about it in the action server cmd line and we can debug from that.
Well, normally when the bot can’t understand what the user’s intent is or not able to pick up entity in a form, it will execute FallbackAction, which utter something like: “Sorry, i don’t understand what you are saying” and then revert back to the latest intent.
But you need to declare the FallbackPolicy in config.yml in order for the bot to behave like that. Did you declare your FallbackPolicy ? If not, please try and see how it goes. You can read more about FallbackPolicy here: Policies
This can be a little bit complicated. I can suggest you a way but it’s not perfect. It depends on you to choose and implement accordingly to your usage.
First, you may create a seperate form just for the user to choose what to order like ChooseOrderForm:
User: I want to make an order
Bot: Please select your option:
- order pizza
- order noodle
- order pasta
User: 1 (this part depends on how you do the entity extraction, maybe have a option entity for it ?)
In the submit function of the ChooseOrderForm, you check the value of ‘option’ slot:
If it’s 1: Use FollowupAction events to the OrderPizzaForm which will take care of the whole pizza ordering process:
Bot: Please select the pizza which you want to order:
.....
If it’s 2: Follow up to OrderNoodleForm
If it’s 3: Follow up to OrderPastaForm
As i said before, i don’t know if this solves your problem perfectly or not. But in my opinion, deviding the logic into different forms make it easier to redirect midway, as well as easier to implement the logic as different small parts. You can try and see if it fits your need.
Anyway, you can read about Events and FollowupAction event here: Events
If you want to print a message straight from the action, you should use dispatcher.utter_message() instead.
How exactly does it not run ? Please explain what you expect, how does it fail, and add any error log whenever you ask about a problem. A simple ‘it doesn’t run’ will make it hard for people to help.
rasa.core.processor - Encountered an exception while running action ‘action_choose_option’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
really i want when user choose 1 or 2 or 3 bot can run another actions like.
Bot: please choose you option
user: 1
Bot: (run the action choose pizza, require: name of pizza, address of user)