WebAssistant: Quickly Deploy an AI Assistant Chatbot for your Personal Webpage
Project description
WebAssistant
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.
Prerequisites
- Make sure you have an OpenAI API key
- Have the base URL of the website for which you want to create the chatbot
Using the Python Library
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()
Using the React App
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.
Questions?
Feel free to send any questions you have through the issues tab on Github.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file webassistant-0.0.4.tar.gz
.
File metadata
- Download URL: webassistant-0.0.4.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b182a5fdd98216c25a36184a266ce6750b5d0c4917443afd6809527a2c7c70e7 |
|
MD5 | 1a971756b6935ecb3d90bced136d4ff7 |
|
BLAKE2b-256 | 98dce7108987056215879fbade9cae122674a8c6dd7d172a46f0a3f04483f08d |
File details
Details for the file WebAssistant-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: WebAssistant-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca199a87c2d68ed16b9f25cc08a48dda183c59056a78b82708ab5305a88b18c |
|
MD5 | 3e47e6b1912ae016112ba354b6fdbd76 |
|
BLAKE2b-256 | 7dbedd9c625d342f3db396992374c6304e0d8bff488d2fca7236a0b5135a4475 |