I have a slot of type list containing options the user can choose from (displayed as buttons).
Each time the user picks an option:
- an utterance is shown.
- the option gets removed from the slot list
- the remaining options are shown
This works. Also explained in a previous topic.
- rule: Show remaining options
steps:
- intent: show_remaining_options
- action: action_remaining_options
- rule: After choosing an option, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- action: action_remaining_options
rasa shell
/show_remaining_options
a
b
c
-> a
b
c
-> b
c
-> c
<empty>
/show_remaining_options
<empty>
However if I want one of the options to not display the remaining options, I cannot empty the list. More precisely rasa shell --debug
and log statements in the action server show that the slot list is empty, but as soon as I show the remaining options with /show_remaining_options
the last options get refilled.
- rule: After choosing an option A, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_a
- action: action_remaining_options
- rule: After choosing an option B, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_b
- action: action_remaining_options
- rule: After choosing an option C, do not show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_c
rasa shell
/show_remaining_options
a
b
c
-> a
b
c
-> b
c
-> c
/show_remaining_options
c
Here is the code in a GitHub repo. It is a minimal working example straight from rasa init
. head~1
has the working example, current commit has the problem described.
If I add a rule to also show the remaining options after c, I have the same problem:
- rule: After choosing an option A, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_a
- action: action_remaining_options
- rule: After choosing an option B, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_b
- action: action_remaining_options
- rule: After choosing an option C, show remaining options
steps:
- intent: choose_option
- action: action_choose_option
- slot_was_set:
- option: utter_c
- action: action_remaining_options