Skip to content

absiemon/QNA-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QNA-Model

This is a AI Chat Model trained on our own set of data. This is a MERN (MongoDB, Express, React, Node.js) application that serves as a starter template for building web applications. It has been created with best practices in mind and includes various features such as authentication, routing, and database integration. Various other tools have been used like OpenAI API, Langchain, Pinecone etc.

image image

Installation

  1. Download project
$ git clone url
  1. Download required node packages using the npm install command:
$ npm install
  1. Create a .env file in root directory of the api directory of the application and add the following variables:
MONGODB_URI= your-mongo-uri
OPENAI_API_KEY = your-openai-api-key
PINECONE_API_KEY = your-pinecone-api-key
PINECONE_ENVIRONMENT = your-pinecone-environment
PINECONE_INDEX_NAME = your-pinecone-index-name
  1. To Get the Pinecone credentials.
  • go to pinecone website.
  • create an account.
  • create an index of dimension 1536.
  • copy all the credentilas needed.
  1. Create a .env file in startup directory of the api directory of the application and add the following variables:
OPENAI_API_KEY = your-open-api-key
  1. Create a .env file in config directory of the api directory of the application and add the following variables:
OPENAI_API_KEY = your-openai-api-key
PINECONE_API_KEY = your-pinecone-api-key
PINECONE_ENVIRONMENT = your-pinecone-environment
PINECONE_INDEX_NAME = your-pinecone-index-name
  1. Create a .env file in root directory of the client directory and add the following variables:
VITE_API_BASE_URL = your-api-base-url ( ex:- http://localhost:port/api )
  1. Go to download file in startup directory of api directory and paste a url of desired youtube video for transcription.

  2. Execute the below command in api directory to download, compress, spliting into chunks, transcribing and embedding the vector into pinecone:

$ npm run dev
  1. start the server using below command:
$ npm start
  1. start the frontend using below command:
$ npm run dev.

User Guide

  1. Start by creating a chat by clicking on create chat. 2 you can start by asking how are you today.
  2. Ask the question related the data that you have provided.
  3. You can delete a chat but all messages related to that chat will be deleted.
  4. All the chats and messages are stored in mongoDB database.
  5. Make sure to use your own API keys.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT