Easily deploy an AI assistant chatbot for your personal website.
This repository contains a Python library and the template for a React app, both of which use state-of-the-art Retrieval Augmented Generation (RAG) prompting methodologies.
- Make sure you have an OpenAI API key
- Have the base URL of the website for which you want to create the chatbot
To use the python library, first install with
pip install WebAssistant
Then, write
from WebAssistant import *
myChatbot = Hub()
myChatbot.launch(YOUR_OPENAI_API_KEY, YOUR_WEBSITE)
This will create a link to a chatbot built with Gradio that can answer questions about your website.
If you're looking for a very basic (and not recommended) solution, simply iframe the link on your webpage. Note that the link will expire every 3 days and will need to be regenerated using launch()
For a more flexible solution, run the following Python code. Make sure you have node installed first.
from WebAssistant import *
myChatbot = Hub()
myChatbot.deployReactExpressApp(YOUR_OPENAI_API_KEY, YOUR_WEBSITE, YOUR_ROOT_DIRECTORY)
This will deploy a React frontend + Express backend to localhost:8080
. From there, you can upload it to Cloudflare, Render.com, Fly.io, Railway, or other providers, and then iframe the link generated by those sites inside a dedicated container in your website for the chatbot.
Note that you must NOT remove the credits to this repository included at the bottom of the chatbot UI.
Here's an image of the React+Express app in action with base url https://shreyanmitra.github.io
Feel free to send any questions you have through the issues tab on Github.