[Solved] RASA FormPolicy

Okay, could you please do an experiment:

  1. Backup your stories.md and empty it afterwards. Fill in:
  • book_appointment

    • doctor_name_form
    • slot{“requested_slot”: “doctor_name”}
    • form{“name”: “doctor_name_form”}
    • form{“name”: null}
    • action_restart
  • book_appointment{“doctor_name”: “Lubab”}

    • doctor_name_form
    • form{“name”: “doctor_name_form”}
    • form{“name”: null}
    • action_restart
  1. Modify domain.yml:

Change:

doctor_name:
    type: text

to

doctor_name:
    type: "unfeaturized"
    auto_fill: 0
  1. Change slot mapping

Change

return {
    "doctor_name": [
        self.from_text()
    ]
}

to

return {
    "doctor_name": [
        self.from_entity(entity="doctor_name")
    ]
}
  1. Retrain
  2. Start Action Server and Rasa an say: a. I want to visit a doctor -> Luba b. I want to visit Lubab

and tell me about the results.