Add memory to chatbot

I’m new to programming, so forgive me if this is a stupid question.

Currently I’m working on this tutorial: Chatbot Tutorial — PyTorch Tutorials 1.8.1+cu102 documentation

But I want the chatbot remembering what I say to it, so it can give me recommendations based on my previous input.
I’d really appreciate your answer.