Thanks you very much @akelad, it worked. Removed the training data of time from nlu also
def validate_time(self, value: Text, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> Dict[Text, Any]: return_slots = [] if value != None: datetime_obj = dateutil.parser.parse(value) apptDate= datetime_obj.strftime('%m-%d-%Y') logger.info("humanDate value: {}".format(apptDate)) time = datetime_obj.strftime('%H:%M:%S') logger.info("time value: {}".format(time)) return_slots.append(SlotSet("appt_date", apptDate)) return_slots.append(SlotSet("appt_time", time)) return return_slots
I am getting below warning of not to setup the slot in the validate. I hope I can live with it.
2020-05-12 08:21:54 WARNING rasa_sdk.forms - Returning values in helper validation methods is deprecated. Your
validate_time()
method should return a dict of {‘slot_name’: value} instead.