Chat bot remembering previous messages

Hi everyone🙂. I am making a chatbot with Openai’s api. How it works is a user submits a chat message and that message gets sent to Open ai and returns a response that I am showing in a repeating group. How could I get the chatbot to remember previous messages? A example is when the message returns to my app I want to be able to ask the Chat “what did I say” and have it remember what was said previously.

Seems like you need to use a bit of a workaround as the API doesn’t currently offer this option How do you maintain historical context in repeat API calls? - #2 by amra.dorjbayar - General API discussion - OpenAI API Community Forum