This project provides an API that exposes a chatbot using LangChain with Express.js. The chatbot uses a Retrieval-Augmented Generation (RAG) approach to retrieve relevant information . This README outlines the setup, configuration, and usage of the API.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/Ryrahul/Express-LangChainJs.git cd chatbot-api
The API uses environment variables for configuration. Create a .env
file in the project root and see the .env.example for reference
After installation and configuration, you can start the API:
npm start
- *POST /chat
- Request body:
{ "message":"Your Message" }
- Request body:
- Navigate to -->> src/utils/save-to-db.ts
- Add Your File Path