I am trying to filling “templateid” slot but instead “ordernum” entity is getting recognized and getting filled.
def request_next_slot(self, dispatcher: CollectingDispatcher, tracker: Tracker,
domain: Dict[Text, Any]):
"""Request the next slot and utter template if needed,else return None"""
for slot in self.required_slots(tracker):
print(slot,'Required')
obj = UserTemplate()
print(self._should_request_slot(tracker, slot))
if self._should_request_slot(tracker, slot):
print('Requsting slot',slot)
if slot == 'template_issue':
issueButtonsList = obj.getTemplateIssues()
dispatcher.utter_message(text = 'Please select what issue in template you are facing?',buttons = issueButtonsList)
return [SlotSet('template_issue', slot)]
if slot =='templateid':
print('here')
# dispatcher.utter_message(template="utter_ask_template_id")
print('ordernum',tracker.get_slot('ordernum'))
return [SlotSet('templateid',slot),FollowupAction("template_filter")]
if slot =='template_options':
issueButtonsList = obj.getTemplateOptions()
dispatcher.utter_button_message(text = 'Please select from the below options?',buttons = issueButtonsList)
return [SlotSet('template_options', slot)]
I understand the entity recognition and intent classification will happen on every user input but in this case templateid is not getting filled. “ordernum” is another slot which is getting filled so i want to copy its value in templateid slot and need to do validate_templateid
how do i dot that?