Skip to content

Ryrahul/Express-LangChainJs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatBot API with LangChain and Express.js

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.

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/Ryrahul/Express-LangChainJs.git
    cd chatbot-api
    

Configuration

The API uses environment variables for configuration. Create a .env file in the project root and see the .env.example for reference

Usage

After installation and configuration, you can start the API:

npm start

Endpoints:

  • *POST /chat
    • Request body: { "message":"Your Message" }

Document For Rag Retrival

  • Navigate to -->> src/utils/save-to-db.ts
  • Add Your File Path

About

Chatbot using LangChainJs and Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published