Previously I had hardcoded a command word that would return a prompt or response given how long ago the prompt was made. However, I think this is clunky and i wanted to make the bot able to respond to more intuitive prompting.
memory_prompt = "you have a memory of your previous conversation with the user. The user prompts and your responses are as follows: " + str(memory)
by adding this line which tells chat gtp it has a memory of the previous conversation and then giving it the previous conversation, I was able to make it respond to intuitive prompts.


This is how the bot worked before I added this functionality. Unless the hardcoded memory response was given as a prompt, the bot had no memory of the past conversation



After I had added this functionality, the bot was able to remember my prompts and its replies!