Accessing the memory with standard prompts

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!

Leave a Reply

Your email address will not be published. Required fields are marked *