I have an issue with Rasa deterministic policies and payloads. I am bulinding a simple (and stupid) deterministic bot that tries to guess your job based on few questions. Questions are answered only by buttons and checkboxes, so there is no natural language processing and I’m using only the following policies:
policies:
- name: FormPolicy
- name: MemoizationPolicy
- name: MappingPolicy
I have a question with a button, then one with a checkbox, and then one with a button again.
Everything works good until I come to the final button. Then, when it is selected, the conversation just stops, even though I see in the log that the right payload was uttered. I tried moving logic from actions.py
to stories and to domain, tried using checkpoints, but nothing made the conversation continue.
One thing that worked was including KerasPolicy
in the configuration file. Then, the conversation contiued, but after this, I faced all kinds of other issues. I will skip them for now as I belive fundamentally, there sould not be a need to include KerasPolicy
in a deterministic bot and there should be another solution to changig payloads.
Can somebody help?
I have the following story:
## dialog beginning
* disclaimer
- utter_disclaimer
- utter_question_1
> check_question_1
## Developer
> check_question_1
* button_Java
-utter_java_dev
## data scientist
> check_question_1
* button_R
-utter_ds
## checkboxes
> check_question_1
* button_python
- utter_question_2
- question_2_form
- form{"name": "question_2_form"}
## happy chatbot path
* button_yes
- utter_happy_chatbot_dev
## sad chatbot path
* button_no
- utter_sad_chatbot_dev
There is a FormAction assosiated with question_2_form
with the folloging logic:
if tracker.get_slot("tensorflow") == 1:
dispatcher.utter_template("utter_ml_engineer", tracker)
if tracker.get_slot("git") == 1:
dispatcher.utter_template("utter_python_dev", tracker)
if tracker.get_slot("rasa") == 1:
dispatcher.utter_template(template="utter_question_happy", tracker=tracker)
where utter_question_happy
looks like this:
utter_question_happy:
- text: >-
Are you happy?
buttons:
- title: 'yes'
payload: button_yes
- title: 'no'
payload: button_no