Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.
.pdf
, .docx
and .txt
+ LangChain and Pinecone
Note: If you'd like to set this up with google auth and mongoDB (as opposed to no auth and using local storage), have a look at this branch: mongodb-and-auth. However, that repo is several important commits behind this one and lacks certain features, so keep that in mind.
Main chat area
Settings page
If you'd like to run this locally and deploy your own version, follow the steps below.
git clone https://github.com/dissorial/doc-chatbot.git
Create an account on Pinecone. Go to Indexes
and Create index
. Enter any name, put 1536
for Dimensions
and leave the rest on default. Then go to API keys
and Create API key
.
Self-explanatory
Right next to your index name, e.g. us-west2-rkw
yarn install
.env
file.env.example
to .env
.env
file should look like this:NODE_ENV=development
utils/makechain.ts
, adjust the QA_PROMPT
for your own usecase. Change modelName
in new OpenAI
to gpt-4
, if you have access to it.Add these to your .env
file:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=
JWT_SECRET=
openssl rand -base64 32
in Git Bash.openssl rand -base64 32
in Git Bash.npm run dev
This repository was originally a fork of GPT-4 & LangChain repository by mayooear but underwent many major changes in this repo.
Frontend of this repo is inspired by ChatGPT.