This project is inspired by TechLead's video on YouTube: Using ChatGPT with YOUR OWN Data
Using LangChain's documentation here
- Clone the repository.
- Install Python and pip.
- Install the dependencies using
pip install -r requirements.txt
- Get your OpenAI API key from here.
You will need to create an account if you don't have one already.
You will also need to add a credit card to your account to use the API and purchase some credits e.g. $5. - Create an environment variable file
.env
and add your API key to it.
For example:OPENAI_API_KEY=<your openai api key> ``
- Change the
data.txt
file to your own data or create a new file and update the path inchatgpt.py
- Run
chatgpt.py
with your query as the argument.
For example:python chatgpt.py "Which books to read on Unit Testing?"
will give you some answer based on thedata.txt
file included in the repo. - You can also replace the pdf file with your own Resume pdf file and change the path in
chatpdf.py
and run with a query as the argument.
For example:python chatpdf.py "Which schools did I attend?"
.