Hi, I want to extract date and time from the DucklingHTTPExtractor for appointment booking. It is going in the same loop and asking the same question and not setting up the slot. Any help @akelad, @Juste, @mloubser
def name(self) -> Text: """" Unique form name """ return "book_appt_form" @staticmethod def required_slots(tracker: Tracker) -> List[Text]: return ["location", "appt_date", "appt_time"] def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: """A dictionary to map required slots to - an extracted entity - intent: value pairs - a whole message or a list of them, where a first match will be picked""" return { "location": [ self.from_entity(entity="location"), self.from_text(intent="location"), ], "appt_date": [ self.from_entity(entity="date") ], "appt_time": [ self.from_entity(entity="time") ] } def submit(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict]: """Define what the form has to do after all required slots are filled""" logger.info("Book appointment form") dispatcher.utter_message(template="utter_appt_thanks") dispatcher.utter_message(template="utter_ask_notes") return [AllSlotsReset()]
entities:
- gender
- quantity
- number
- location
- date
- time
config
pipeline:
- name: WhitespaceTokenizer
- name: CRFEntityExtractor
- name: EntitySynonymMapper
- name: CountVectorsFeaturizer token_pattern: (?u)\b\w+\b
- name: DIETClassifier
- name: SpacyNLP model: en_core_web_md
- name: SpacyEntityExtractor dimensions:
- PERSON
- name: DucklingHTTPExtractor url: http://localhost:8000 dimensions:
- date
- number
- date
- time timezone: “US/Pacific”
policies:
- name: FallbackPolicy
- name: AugmentedMemoizationPolicy
- name: FormPolicy
- name: MappingPolicy
- name: EmbeddingPolicy epochs: 100
logs
2020-05-06 09:20:31 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘a6671406b83f4c8694a97d12f0d79ef9’. When do you prefer to meet the doctor?
Your input -> monday at 5 pm
2020-05-06 09:20:38 DEBUG rasa.core.tracker_store - Recreating tracker for id ‘a6671406b83f4c8694a97d12f0d79ef9’
2020-05-06 09:20:39 DEBUG rasa.core.processor - Received user message ‘monday at 5 pm’ with intent ‘{‘name’: ‘out_of_scope’, ‘confidence’: 0.9830948710441589}’ and entities ‘[{‘start’: 0, ‘end’: 14, ‘text’: ‘monday at 5 pm’, ‘value’: ‘monday at 5 pm’, ‘confidence’: 1.0, ‘additional_info’: {‘values’: [{‘value’: ‘2020-05-11T17:00:00.000+00:00’, ‘grain’: ‘hour’, ‘type’: ‘value’}, {‘value’: ‘2020-05-18T17:00:00.000+00:00’, ‘grain’: ‘hour’, ‘type’: ‘value’}, {‘value’: ‘2020-05-25T17:00:00.000+00:00’, ‘grain’: ‘hour’, ‘type’: ‘value’}], ‘value’: ‘2020-05-11T17:00:00.000+00:00’, ‘grain’: ‘hour’, ‘type’: ‘value’}, ‘entity’: ‘time’, ‘extractor’: ‘DucklingHTTPExtractor’}]’
2020-05-06 09:20:39 DEBUG rasa.core.processor - Current slot values: age_category: 2 appt_date: None appt_time: None date: None days_old: 12 location: california name: Shawn phone: 555-555-5555 requested_slot: date time: monday at 5 pm 2020-05-06 09:20:39 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 30 events. 2020-05-06 09:20:39 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Current tracker state [{‘intent_greet’: 1.0, ‘slot_age_category_1’: 1.0, ‘prev_utter_doc_appt’: 1.0}, {‘intent_affirm’: 1.0, ‘prev_action_listen’: 1.0, ‘slot_age_category_1’: 1.0}, {‘prev_utter_appt_req’: 1.0, ‘intent_affirm’: 1.0, ‘slot_age_category_1’: 1.0}, {‘prev_book_appt_form’: 1.0, ‘intent_affirm’: 1.0, ‘active_form_book_appt_form’: 1.0, ‘slot_age_category_1’: 1.0}, {‘intent_out_of_scope’: 1.0, ‘entity_time’: 1.0, ‘prev_action_listen’: 1.0, ‘active_form_book_appt_form’: 1.0, ‘slot_age_category_1’: 1.0}] 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Launch DeLorean… 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {‘intent_out_of_scope’: 1.0, ‘entity_time’: 1.0, ‘prev_action_listen’: 1.0}] 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-06 09:20:39 DEBUG rasa.core.policies.form_policy - There is an active form ‘book_appt_form’ 2020-05-06 09:20:39 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy 2020-05-06 09:20:39 DEBUG rasa.core.processor - Predicted next action ‘book_appt_form’ with confidence 1.00. 2020-05-06 09:20:39 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘book_appt_form’. 2020-05-06 09:20:39 DEBUG rasa.core.processor - Action ‘book_appt_form’ ended with events ‘[BotUttered(‘When do you prefer to meet the doctor?’, {“elements”: null, “quick_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, {“age_category”: “2”, “days_old”: 12, “location”: “california”, “name”: “Shawn”, “phone”: “555-555-5555”, “requested_slot”: “date”, “time”: “monday at 5 pm”}, 1588737039.100034), <rasa.core.events.SlotSet object at 0x0000023E21AE6648>, <rasa.core.events.SlotSet object at 0x0000023E215CC848>]’. 2020-05-06 09:20:39 DEBUG rasa.core.processor - Current slot values: age_category: 2 appt_date: None appt_time: None date: None days_old: 12 location: california name: Shawn phone: 555-555-5555 requested_slot: date time: monday at 5 pm 2020-05-06 09:20:39 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Current tracker state [{‘intent_greet’: 1.0, ‘prev_action_listen’: 1.0}, {‘intent_greet’: 1.0, ‘prev_action_fetch_profile’: 1.0, ‘slot_age_category_1’: 1.0}, {‘intent_greet’: 1.0, ‘slot_age_category_1’: 1.0, ‘prev_utter_doc_appt’: 1.0}, {‘intent_affirm’: 1.0, ‘prev_action_listen’: 1.0, ‘slot_age_category_1’: 1.0}, {‘prev_utter_appt_req’: 1.0, ‘intent_affirm’: 1.0, ‘slot_age_category_1’: 1.0}] 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Launch DeLorean… 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, None, {}] 2020-05-06 09:20:39 DEBUG rasa.core.policies.memoization - There is a memorised next action ‘action_listen’ 2020-05-06 09:20:39 DEBUG rasa.core.policies.form_policy - There is an active form ‘book_appt_form’ 2020-05-06 09:20:39 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘out_of_scope’. 2020-05-06 09:20:39 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy 2020-05-06 09:20:39 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00. 2020-05-06 09:20:39 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘[]’. 2020-05-06 09:20:39 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘a6671406b83f4c8694a97d12f0d79ef9’.
When do you prefer to meet the doctor?