Hello,
I have a form that takes car registration number as input from the user.
My issue is that, the form is asking for the slot value twice before it moves forward in the flow. The conversation with the bot in rasa shell looks like this:
> [Bot]: Please enter your car registration number. > Your input -> KA 09 TH 2990 > Your input ->
(It asks to enter the value again, after it has been entered once.)
The value given the second time is the value that is filled in the slot. After it has been entered the second time, the rest of the flow continues.
My slot for the registration number in domain.yml looks like this:
registration_number: type: unfeaturized
A part of my stories.md file is below:
(car_registration_form is the form that takes the registration number from the user.)
* greet
- utter_greet
* affirm
- utter_get_car_details
- car_registration_form
- slot{"registration_number": "ka 90 rt 2939"}
* provide_registration_number{"registration_number": "ka 90 rt 2939"}
- action_car_make_display
- slot{"car_make": "BMW"}
Below is the code for the form in my actions file:
class CarRegistrationForm(FormAction):
def name(self):
return "car_registration_form"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
return ["registration_number"]
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict[Text, Any]]]]:
return {
"registration_number": [
self.from_entity(entity="registration_number", intent="provide_registration_number")]
}
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
return []
nlu.md:
## intent: provide_registration_number
- my registration number is [KA05Z4010](registration_number)
- [ka05mk9012](registration_number)
- [MH 11 AZ 6742](registration_number)
- [HR 20 RF 8925](registration_number)
- [kl34rt2145](registration_number)
- [wb 78 we 6811](registration_number)
- my car's registration number is [AP 01 MZ 4433](registration_number)
- [TN52M2101](registration_number)
- [mh 01 ah 2314](registration_number)
- [jk12mk8893](registration_number)
I’m unable to figure out why this particular slot is being asked twice, when this is not the case for the rest of my slots. Any help would be greatly appreciated!