How to access conversations stored in Inmemory tracker store of rasa?

How to access conversations stored in Inmemory tracker store of rasa? I could not find answer to the same in rasa docs.

tracker.events_after_latest_restart() will return a list with all the events in that conversation since the last restart.

@Gehova Where does this code go, actions.py or run.py? and how do i run it? Can you please elaborate a little?

Thanks!!

In action.py, tracker is one of the parameters of the run method of your actions.

1 Like
class ActionRasaHistory(Action):
     def name(self) -> Text:
          return "action_rasa_history"

     def run(self, dispatcher: CollectingDispatcher,
             tracker: Tracker,
             domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
          events = tracker.events_after_latest_restart()
          questions = [ x["text"] for x in events if x["event"] == "user" ]
          output = "\n".join(questions)
          dispatcher.utter_message(text=output)
          return []