How to attach files on conversation with bot that user openai api

I have a chatbot that uses the gpt chat api, and when the user attaches files I need the AI ​​to understand these files and respond according to the user’s message and these files that were attached. I need this information to be saved in the context of the conversation in some way, and that way, whenever the user leaves the conversation and returns, the AI ​​will know how to continue the conversation, it will not have “forgotten” the information. How can I do this?