I want to extract key terms from rental agreements.
To do this, I want to send the PDF of the contract to an AI service that must return some key terms in JSON format.
What are some of the different libraries and companies that can do this? So far, I've explored the OpenAI API, but it isn't as straightforward as I would have imagined.
When using the ChatGPT interface, it works very well, so I thought using the API should be equally simple.
It seems like I need to read the PDF text first and then send the text to OpenAI API.
Any other ideas to achieve this will be appreciated.
What you want to use is the Assistants API.
As of today, there are 3 tools available:
You need to use the Knowledge Retrieval tool. As stated in the official OpenAI documentation:
I've built a customer support chatbot in the past. Take this as an example. In your case, you want the assistant to use your PDF file (I used the
knowledge.txtfile). Take a look at my GitHub and YouTube.customer_support_chatbot.py