A custom Chatbot using OpenAI embeds and chat to allow you to chat with your documents
backend/
: Contains Python scripts for data processing and the FAISS index.chatbot-frontend/
: The frontend code of the project built with Node.js.
- Python 3.x
- Node.js 16.x
-
Start off by running venv
python3 -m venv venv source venv/bin/activate
-
Install the required Python dependencies:
pip install -r requirements.txt
-
Create a backend/documents folder and copy your files into that folder
- Navigate to the
chatbot-frontend
directory:cd chatbot-frontend
- Install the Node.js dependencies:
npm install
Make sure you are in your (venv) source in your terminal, if not, run
python3 -m venv venv
source venv/bin/activate
To run the backend service:
uvicorn main:app --reload
To start the frontend:
npm start
To add new documents, stop the backend service, copy the files into the backend/documents folder, then run
rm -rf faiss_index
uvicorn main:app --reload