after I finished my conversation I would like to start a new conversation but my bot save all the slots informations from the previous conversation I read the doc paper in rasa but to be honest I do not know how to handle and please provide for me explain plz and thx in adv
Go to your rasa lib file in your python. Check rasa_sdk [not rasa_core_sdk].
Go to the events.py and you will see the available methods to be called for dialogue management.
in your code, you can do:
from rasa_sdk.events import AllSlotsReset
class ActionHelloWorld(Action):
def name(self) -> Text:
return "action_hello_world"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message("Hello World!")
return [AllSlotsReset()]
Remember, you always need to return the function in order to execute it.
2 Likes
thank you so much for your example but I want to recent slot in form action it will be same it is ?
Thank You for the answer! It worked.
The mistake i was making was that i was importing AllSlotsReset()
from rasa_core.events
instead of rasa_sdk.events
.
Thank you for the answer … its working!!
You can also send /restart
2 Likes
@samscudder does restart and reset works same?
I am trying to achive the same. Can you please share how did you handle this?