Note: Currently, it only supports markdown & txt files. Maybe in the future, I will support more file types (like pdf, docx, xls, etc.)
Note: Add the
OPENAI_API_KEY
to your environment variables in the Gitpod dashboard OR in the.env
file.
You can add your own data in the data
folder. You can add multiple files in the data
folder. The more data you add, the better the model will be. Currently, it only supports markdown & txt files.
Run the following command:
pyenv virtualenv 3.9.9 fun_openai_work
pyenv activate fun_openai_work
python server.py
Open the url that is generated in the terminal. It will look something like this: http://127.0.0.1:5000/
Ask your question with:
http://127.0.0.1:5000/chat?question="something about siddhant"
Output:
Note: if you want to rebuild your db, just delete the "checkpoint" file. It will rebuild the db from scratch. And, then you can run the server again.