Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Swoyam1/KnowledgeBase-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

11 Commits

Repository files navigation

Node.js PDF Knowledge Base

Tech Stack

  • JavaScript
  • Node.js
  • Express.js
  • MongoDB
  • pdfReader
  • Embedding API (OpenAI)
  • Thunder Client (API CLIENT)

Local Development

Start developing locally.

Step-1

clone this repo

git clone https://github.com/Swoyam1/KnowledgeBase-RAG.git

Step-2

Install all dependencies

# install server side deps
npm install

Step-3:

Create a SEARCH INDEX in MONGODB ATLAS

Step-4:

Create a .env file in root folder and write these code

MONGO_URL = "PROVIDE YOUR MONGODB ATLAS URL"
OPENAI_API_KEY = "PROVIDE YOUR OPENAI API KEY"

Step-5: Starting the server

Finally to start the server execute this script

npm run dev

After starting the server it should be running on http://localhost:7000

API

/document

  • POST : Post query to add vector embedding of PDF to the database

/query

  • POST : Post query and get the answer to the query in response
# post query body element
{
 "query" : "PROVIDE YOUR QUERY"
}

About

This is a node.js project leveraging the OpenAI API for vector embedding, seamlessly integrating with MongoDB to store embedded data and facilitating efficient query-based retrieval for enhanced knowledge management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /