@Zylatis that make sense and thats exactly what i am looking for (in case you don’t have any specifed format for the reference number, for eg. same length digits) (would your bot also accept a text instead of a number?)
I am trying to use action_listen and currently working on it. But its causing some errors and unexpected behaviours.
User input from action_listen is not being set in the slot and the story is not being followed.
The specific portion of my story goes like this:
* inform{"date": "2019-04-19"}
- action_end_date
- slot{"to": "2019-04-19"}
- utter_ask_reason
- action_listen #user inputs any random reason that may not be in the intent
- action_ask_reason #to set the slot
- utter_confirmation
The action is written as:
class AskReason(Action):
def name(self):
return 'action_ask_reason'
def run(self, dispatcher, tracker, domain):
personal = tracker.latest_message.get('text')
return [SlotSet('reason',personal)]
Inform intent contains only sample date and time formats which i need:
## intent:inform
- [2019-04-16](date)
- [2019-04-19](date)
- [2019-04-20](date)
- [09:30:00](time)
- [10:00:00](time)
I did not make an intent for the “reason” because if i had made one , the slot will only be set if my reason fell under the respective intent.
since i am new to RASA, please feel free to suggest anything that could be missing here 