The past does not follow the message

I made a bot with chat completions using the gpt-3.5-turbo model, but it’s not able to track past chat. Do you have a recommendation?

Is there a special variable? I probably need to solve this problem by writing code.

Yes. You need to pass the history of chat with each request. In documentation, this is explained.