Ask questions to your PDF documents using OpenAI's GPT-3.5-turbo.
- clone the repository with
git clone https://github.com/1Blademaster/pydocuchat.git
- cd into the repository with
cd pydocuchat
- install the requirements with
python -m pip install -r requirements.txt
Create a .env
file by using cp .example.env .env
, then inside the environment file, you can add your OpenAI API key which you can get from here. DO NOT SHARE YOUR API KEY WITH ANYONE.
Note: In order to ask more than 3 questions a minute, you will have to create a billing account with OpenAI. This can be done on the same dashboard where you obtained your API key from. You may get rate-limited within 48 hours of setting up the billing account, however after the first 48 hours everything should be fine.
Simply run python pydocuchat.py
to start adding PDFs.
In the menu, select "Add a PDF", from there you can either input the full path to a PDF document, or place your PDF's in a folder called pdfs
within the main pydocuchat
folder. Depending on the size of your PDF, this may take some time.
Then you can start asking questions by selecting a PDF and typing into the terminal.
This code is distributed under the Apache-2.0 license. See LICENSE
for more information.