I’m trying to migrate Rasa from 2.4.1 to Rasa 3.0.* , But I’m facing issue in new FormValidationAction class as FormAction class used to have async def submit() method which is missing in FormValidationAction class. You can see it in the images below. I was performing certain operations in the submit method such as sending back response to the bot or sometimes setting the slot back to none after the condition and the process is done ( Acc to my use case )
But I am not finding any submit method in the new FormValidationAction class
Image is for FormValidationAction class
Yes @nik202 I have to migrate as Rasa3.0 has removed FormAction class but changing from FormAction to FormValidationAction has issue like missing submit method in the FormValidationAction
Actually I was performing certain operation in submit method that I can do in validate_slot method as well. But in few cases I have to set the called slot value to None which if I do in validate_slot method would invoke the slot again
@anoopshrma mean you are taking about something like this code?
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
"""Define what the form has to do
after all required slots are filled"""
@anoopshrma the one you told was used in 1. x check doc and its was not even part of 2.x and 3.x. Over the last few months and years, Rasa updated code a lot. The repo and link shared in this post FormAction submit method in Rasa 3.0 - #4 by nik202 is the only available solution.
Yes @nik202 it was in Rasa 1.x and deprecated warning started showing in rasa 2.x but my question is
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
"""Define what the form has to do
after all required slots are filled"""
Now if I want to let’s say empty theslot after a certain operation, can I do that in the middle of a story? Earlier I used to set slot empty in submit method and it worked fine, Is there any work around for me to empty the slot after I set the slot value in the form?