visam
(Visa)
1
Hi,
I am trying to clear slots as a custom action:
This is my custom action code:
from rasa_core.events import SlotSet, AllSlotsReset
class action_slot_reset(Action):
def name(self):
return ‘action_slot_reset’
def run(self, dispatcher, tracker, domain):
return [AllSlotsReset()]
When this action gets triggered, I am getting an error from the server:
TypeError: Object of type AllSlotsReset is not JSON serializable
Stories:
- reset
-action_slot_reset
-reset_slots
Ghostvv
(Vladimir Vlasov)
2
from rasa_core.events import SlotSet, AllSlotsReset
- it is wrong import
these classes should be imported from sdk
, see docs for details:
1 Like
visam
(Visa)
3
Thank you very much, that helps!
visam
(Visa)
4
@Ghostvv If you can give your inputs on this, that will be really really helpful!