Save user inputs

hey guys I am building a bot using a consoleInputchannel and I want to save save the user input in order to use it to train rasa nlu model After a little research I found DialogueStateTracker.as_dialogue() that returns a dialogue abject but I didn’t know how to use it can any one explain it to me or have any other solution to my problem

You can use Mongodb or Redis for storing user inputs