Chat with your PDF file using OpenAI's assistant API, with highlights for annotations retrieved from the chat.
In the backend
directory, run:
pip install -r requirements.txt
In the chatpdf
directory, run:
npm install
You will need to create an account on OpenAI's platform and get an API key. You can find more information here.
Then, at here, create a new assistant and get the assistant's ID. Example prompt for the assistant:
You are a helpful assistant. Your task is to review a file from 'data/xxxx, it is in your Files, you must generate the response based on the file.
Finally, fill in the backend/.env
file with the API key and the assistant's ID.
In the backend
directory, run:
npm run serve
In the chatpdf
directory, run:
python app.py
Favicon taken from https://icon-icons.com.
Part of the OpenAI's assistant API code was taken from https://github.com/ryo-ma/gpt-assistants-api-ui.
Thanks a lot to all the contributors of the above projects.