chatgpt-webapp

Deploy a webapp chatbot of chatGPT with openAI API Key and gradio

You may need two things below, for Chinese people I’ll list the tutorial at the end: 1. An openAI API Key, maybe a VPN to apply one. And set a environment variable named OPENAI_API_KEY to store it. 2. A credit card not applied in China sovereign area if big usage is expected.

Install

pip install openai, gradio, fire

git clone https://github.com/DanXu-git/chatGPT_webapp

How to use

cd chatGPT_webapp 
chatgpt_webapp/chatGPT_webapp.py \
--IP [your server IP, e.g 10.10.10.199] \
--Port 5010[default] \
--model_engine 'gpt-3.5-turbo'[default]

chatGPT_webapp.py --help # for usage

for Chinese user, 中国用户指引

注册openAI账号教程链接

申请openAI API Key:
>登陆账号后点击右上角personal个人头像 -> View API keys -> create new secret key,
>复制key创建一个环境变量, export OPENAI_API_KEY=$your_key

申请虚拟信用卡(API key有免费额度,超出支付用): https://depay.depay.one