Using OpenAI API for Chat with Document

I need create a custom app for people be able to chating with their documents.
There are some important points. Firstly, I must store users’ all documents’ summaries at custom model. Because all documents will be related each other and users can ask “what is difference between old document and new document?”. How to manage that at openai services?
Secondly, I want to create a service for listening a folder at cloud. When new file added folder I will call openai api for summarizing folder and store information at model.

You will probably need to implement some custom built listener, that will trigger the call to OpenAI API. But it is fairly easy to create a service that communicates with OpenAI assitant of your choice. I’ve recently made one myself. You can just pass it any assistant’s ID and if you equip it with the right set of instructions, it will comunicate with the service.

Depending what cloud services you are using, you will probably need to set some Actions (JSON or OpenAPI schema) for your GPT. I’ve been putting together schemas for Google API services based on their documentation. GPT 4 can help with it, even though they tend to be long so need to be created in chunks and then OpenAI validator has often some issues parsing them, so it takes some manual labor to get it working correctly. But I’ve been testing it last few days and not being for recent glitch of GPT being really slow and neglecting external calls (especially today), it’s been working fairly well.

So it really depends on your use case. Also GPT will probably refuse to compare extensively long documents, so if you want to just know which document is new and which is old, comparing their metadata would be the way to go.