This is a chatbot built using Gradio that can access Google Search and webpages to answer questions:
- Supports LLMs: GPT-3.5, GPT-4, Claude 2, Llama 2 (70B)
- Supports browsers: Chrome, Firefox, Safari, Edge
See this article for an overview of the implementation.
Clone this repo:
git clone https://github.com/thaitran/WebChat.git
cd WebChat
Install required Python modules:
pip install -r requirements.txt
If you'd like to use GPT-3.5 or GPT-4, sign up for an OpenAI developer account, obtain an API key from https://platform.openai.com/account/api-keys and then set the following environment variable:
export OPENAI_API_KEY=<your key>
If you'd like to use Claude 2, sign up for an Anthropic developer account, obtain an API key from https://console.anthropic.com/account/keys and then set the following environment variable:
export ANTHROPIC_API_KEY=<your key>
If you'd like to use Llama 2, sign up for a Hugging Face Pro account -- this gives you unlimited usage of Llama 2 inference for $9/month. Obtain an access token from https://huggingface.co/settings/tokens and then run:
huggingface-cli login
or set the following environment variable:
export HUGGING_FACE_HUB_TOKEN=<your token>
python app.py
Then open your web browser to http://127.0.0.1:7860
If you'd like to provide feedback, you can reach the author at:
- LinkedIn: https://www.linkedin.com/in/thait/
- Twitter: @thait
- Threads: @thai