Using api with the help of personalized data

Hello, I have a wordpress plugin and I was able to connect the openai api to it, but now I want to upload a file to openai, which after analyzing that file on the site will answer the questions of the users. In addition, I made the JPT of what I wanted, if There is a way that I can transfer its functionality to my WordPress plugin, I would appreciate it.