Hi, I have 3 required slots in a form. I have 3 extraction and 2 validation methods in FormValidationAction class. Upon value is entered for every slot in a form, 5 methods in FormValidationAction are called. How do we know upon what slot data entry, are these 5 methods are being called? I am checking if the value is set for a slot in the method and return if the value is not set. Are there any other ways?
I have 3 requested slots ‘my_date’ and ‘my_time’ and ‘name’ in a form. Each time a value is entered, 3 extraction and 3 validation methods are called. When the second slot value of ‘3pm’ is entered, the slot ‘my_time’ slot is not set with ‘3pm’, whereas ‘my_date’ value was entered, my_date slot was set with the date value, not sure why??? I am trying to use t tracker.latest_message.get(“text”) to fetch and ‘3pm’ and set the slot inside the extraction method for my_time slot. However, the same my_time slot’s extraction method is called when ‘my_date’ slot value is entered. if I use the tracker.latest_message.get(“text”) method to set the slot for my_time, I may end up assigning the value of my_date slot input to my_time, because, there is no way to check which slot value is being prompted for in a form loop when all 3 extraction methods are called every time…
Is there a way to tell which slot value is being prompted in the form loop?
Hello Jay,
Is there a way to tell which slot value is being prompted in the form loop?
you can check which slot is being asked adding this condition at the beginning of each extraction method:
if not tracker.slots["requested_slot"] == "slot_name": # slot_name should be the slot you are extracting
return {}
That way only one method will perform the extracting. I hope it helps.