Issue with OpenAI API on my app

I’ve integrated a chatbot that’s designed to keep conversations going and prompt the user to act in a certain way, and it’s crucial for the chatbot to remember what the user has said in order to give better responses.

The goal is for the conversation to be long and engaging with the chatbot, but unfortunately, I’m running into an issue where the OpenAI API doesn’t seem to remember what the user has typed previously. For example, if the user tells the chatbot that they’re feeling down, the chatbot may ask “what’s causing you to feel that way?” but then quickly forget what the user had said in the previous sentence.

What I’m looking for is for the chatbot to work in a similar way to ChatGPT, where it’s able to keep context and remember what the user has said previously. This will allow for a more personalized and engaging conversation with the chatbot.

I’m currently using Flutter for my app and this issue has been really frustrating for me. I would greatly appreciate any help or advice on how I can resolve this issue and get the chatbot working the way I need it to. Thank you so much for your time and assistance!

Welcome @nikalacabidze111

What model are you using?

Where’s the code making API call?