This template is an open-source, user-focused AI platform template. It's specifically designed for building chatbots that connect language models to your documents, using NEXT.js. By leveraging embeddings. it provides an opportunity to create AI chatbots that reference your data and don't hallucinate false answers.
Link to a example project: https://ai-ev-finder.vercel.app
- User-friendly interface
- Data-awareness, connecting the language model to other data sources
- Scalability with a pinecone database to store documents or data
To install and run this project locally, follow these steps:
- Clone the repository.
- Install the dependencies with
npm install
. - Sign up for a Pinecone DB & OpenAI Account.
- Copy the
env.example
file and rename it to.env
. Generate and fill in the necessary environment variables. - Use the dataloaders folder to add data and documents to your Pinecone database. Simply input your data path or url and then run
node date-website.mjs
- Load as much data into the database as necessary for your chatbot to have a large enough knowledge base on the topic required.
- Start the development server with
npm run dev
.
This web application was developed using a range of technologies. It implements the ConversationalRetrievalQAChain from LangChain, takes two inputs: a question and the chat history. It combines the chat history and the question into a standalone question, retrieves relevant documents, and then passes those documents and the question to a question-answering chain to return a response.
Additional resources include:
Feel free to fork this project and train it on any set of documents or data you wish. We warmly welcome contributions from the open-source community.
This chatbot template is licensed under the MIT License.
For any questions or support, please contact Alex Robinett.