Hey guys, i am new to Rasa 2.0. I am currently working on a student project which calculates the total price for food that user orders. However, I keep getting TypeError which means tracker.get_slot() returns None value. The code of my custom action is shown below:
I am a bit confused about the purpose of requested_slot. Does tracker.get_slot() return the value from requested_slot? Because requested_slot is set to null in my rules.yml.
that will be much appreciated if someone can help me out here!
Hi @Elliot . I think the error occurs because for some reason the slot drinks_num returns None for you. Are you filling in this slot with a form? I think what is happening is that in your rules with requested_slot: null you are resetting last requested slot to none. Is there a particular reason why you have this step in your rules?
After your form completes (collects the necessary data), you should submit the form with your custom action. I don’t think I can see that happening in your rules. The rules could look something like the following:
Hey Juste. Thanks for your message. I am currently working on an AI assistant which take orders from users for the restaurant. And this is one of my capstone project