Access document contents using API in Python

Hi all,

I’m currently trying to deal with a document with ChatGPT using the OpenAI API in Python. I had several thoughts: (1) build an assistant and feed the document in the “file search” section and then call this assistant in my codes (2) upload any document to some online drive and access it by providing a link to ChatGPT in my codes. Right now, neither approach is working fine.

What is the ideal way to do this? Thanks