Skip to content

KavehMina/Spino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a fullstack Q&A app that answers question based on the text documents provided to it. It uses LangChain to communicate with OpenAI API to interpret questions and give answers.

Stack

React TypeScript Redux OpenAI LangChain NodeJS GraphQL MongoDB Auth0

Requirements

  1. Auth0
    Create a Single Page Application in Auth0.com > grab application's domain and cleint ID.
  2. MongoDB
    Create a MongoDB Atlas project > grab connection string and admin password.
  3. OpenAI
    Create an OpenAI account > grab your API key.
  4. in the server directory create a .env file and set these values:
    ISSUER = {AUTH0-APPLICATION-DOMAIN}  
    OPENAI_API_KEY = {YOUR-OPENAI-API-KEY}  
    MONGOPASSWORD = {YOUR-MONGODB-PASSWORD}  
  1. in the client directory create a .env file and set these values
    VITE_DOMAIN = {AUTH0-APPLICATION-DOMAIN}  
    VITE_CLIENT_ID = {AUTH0-APPLICATION-CLIENT-ID}  

Starting Up

cd server
npm start

then, in a new terminal,

cd client
npm run dev

Documents

The app currently reads from two provided sample documents about Spinosaurus (of course). Namely, "about.txt" and "description.txt". You can replace your own documents and change the corresponding paths in server/src/AI/QA.ts, so that it gives answers according to your documents.

About

This is a Q&A app using LangChain to communicate with OpenAI API to interpret questions and give answers based on the provided documents.

Topics

Resources

Stars

Watchers

Forks

Contributors