Hi,
I’m looking to build the following story but i have yet to find any useful reference from the forum. Any advise or ideas are much appreciated.
I have a bot that will require user to provide slot A and slot B.
I allow user to stop and detour at any point of time when answering slot A and slot B. (Thus, user will be redirect back to main menu, in my case)
Anytime when the user visit back the bot, I want to first check whether the user filled up both slot A and B.
If either one of the slot is not filled, i will continue to ask the user to provide the information.
If both slot is fill, I will then ask them whether they want to edit it
What i have tried :
Created a FormAction and set the requested_slot to be A and B
Created a custom Action and do a checking with tracket.get_slot("A") and tracker.get_slot("B"). If either one of A & B is a None value, set a FollowupAction(‘FormAction’)
Problem that i am facing:
The flow will always stuck at the custom Action part, even if i’m still missing out any of the slot to fill.
I’m also trying to figure out is there a way this can be done with just utilizing FormAction? (eg: if requested_slot is A, continue the Form; if requested_slot is None, lead to a custom Action that user can edit the slot values)
For any new visit, the custom action will trigger first (check whether slot A and B are None, if yes FollowupAction with the FormAction).
For some reason, i was unable to proceed to the FormAction. Rasa wil always lead me to the utter_ask_for_modify output i set for when both slot A and B are filled. This is still the case after i ran /restart and reset all slots.
Shouldn’t 'None' be None (without apostrophes)? You’re checking against the string None instead of a python null value, and it will always trigger utter_ask_for_modify.
Edit: Also… you shouldn’t use != and == with None… Use is and is not, so it would be like this:
if tracker.get_slot('slot_a') is not None and tracker.get_slot('slot_b') is not None: