I have been working on my chatbot and have found the problem that my slot ‘selected_dimensions’ is not being set in one of my actions when I have the return value:
However, this bug doesn’t occur when I use rasa interactive. It occurs however when I use rasa shell or rasa run with Telegram.
I have tested my bot many times and found that the slot is indeed not being set because it’s causing problems in following actions. But like I said, this problem doesn’t occur when I use rasa interactive.
Can anyone give me a tip on how I can fix this issue? Is there a bug in SlotSet possibly?
SlotSet is heavily used so I think a bug is not likely. What version of Rasa are you using? Can you do a print of the selected_dimensions and the channel name just before the return.
I have looked a little bit more into the problem and have found that the slot is being set, but its value is not staying when I run the next action.
Here is the output of the results of tracker.get_slot(‘selected_dimensions’) from the custom action “action_confirm_valor” after SlotSet was run with the current value of selected_dimensions being {‘Ano’: ‘2010’, ‘Filial’: ‘Rio de Janeiro’}, and the output of tracker.get_slot(‘selected_dimensions’) in the action “action_get_vendas” which is run after it.
SlotSet('selected_dimensions', selected_dimensions)
selected dimensions at the end of action 'action_confirm_valor'
tracker.get_slot('selected_dimensions'): {'Ano': '2010', 'Filial': 'Rio de Janeiro'}
selected_dimensions in next action 'action_get_vendas'
tracker.get_slot('selected_dimensions'): {'Ano': '2010', 'Filial': 'Sao Paulo'}
For example, here is a part of a story:
- action_confirm valor
- slot{"selected_dimensions":{"Ano": "2010", "Filial": "Rio de Janeiro"}}
- slot{"campo": null}
- slot{"campo_valor": null}
* vendas
- action_get_vendas
Here is a screenshot of a part of a conversation on Telegram where the value of the slot was not saved to use for the next action “action_get_vendas”.
Every time I run this sequence of intents and actions in rasa shell or on Telegram, I get the same result of the slot not changing, but when I use rasa interactive it changes.
I found that the slots were being “unset” somehow because of the fallback policy that was being used. I removed the FallbackPolicy from config.yml and my code worked fine after that.