Skip to content
/ chatgpt-faq Public template

A ChatGPT powered FAQ chatbot template for connecting your external data sources to an LLM using Llama Index as backend

Notifications You must be signed in to change notification settings

machaao/chatgpt-faq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI powered FAQ Chatbot

Build your own ChatGPT powered faq / knowledge base chatbot that can infer and answer queries based on the information provided via an external data source

Requirements for running it locally on laptop

  • Windows / Mac / Linux with Git installed
  • Python 3.8+
  • MessengerX.io API Token - FREE for Indie Developers
  • Open AI Key
  • Ngrok for Tunneling

Install requirements

pip install -r requirements.txt

Create a new .env file in the root directory

  • For Linux / Mac
nano -w .env
  • For Windows
type nul > .env 

Add the following values to your .env file

OPENAI_API_KEY=<YOUR_OPEN_AI_KEY> # your open ai key
MESSENGERX_BASE_URL=https://ganglia.machaao.com
OVERRIDE_INDEX_CHECK=False 
  • Set OVERRIDE_INDEX_CHECK to True if you want the bot to automatically retrain your index when you update your data source

Add your data sources in the data directory

  • It can be of any type (.txt, .pdf etc.) and may contain multiple files. Its totally flexible

Run your chatbot app on your local server

python app.py

Start ngrok.io tunnel in a new terminal (local development)

ngrok http 5000

Update your webhook to receive messages

Update your bot Webhook URL at MessengerX.io Portal with the url provided by ngrok

https://<Your NGROK URL>/machaao/hook
  • If your NGROK URL is https://e9fe-115-187-40-104.in.ngrok.io then your bot settings page should look like this 👇🏻 figure

Your chatbot is now ready to start receiving incoming messages from users

# HappyCoding

About

A ChatGPT powered FAQ chatbot template for connecting your external data sources to an LLM using Llama Index as backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages