In my ‘action_ask_weather’ action class, the ‘run’ method returns:
return [Restarted()]
By doing this, I want to be able to have the effect of having only single-turn dialog, that is. the bot only supports a single Question-Answer pair between user and the robot. Once the answer is generated through the action class, I thought I should return a list of Restarted() to destroy any previous dialog history. However, when I test, this return value doesn’t have any effect, and when I debug into the code in processor.py, the history is still remembered well, including the events and slots.
Should I do something else, in addition to the returned value to achieve the effect?
restarted doesn’t erase all previous events. It is taken into account when creating applied_events() for featurization, so that policies ignore all previous history. So effectively you remove all history, so it’s still work
tracker.events are not used entirely for featurization. For featurization we use tracker.applied_events() which doesn’t include any history before Restarted()
@Ghostvv, So, do you have a recommendation on how to achieve a single-turn dialog robot? By that, simply remove all previous events at some point? Is there a way to do that?