准备工具如下
- 申请Chat GPT 的key(github新注册未满7天用户用这个openai白嫖地址)
https://github.com/chatanywhere/GPT_API_free - 开源Chat GPT 网页
https://github.com/Yidadaa/ChatGPT-Next-Web - 虚拟机安装linux系统
申请key
https://github.com/chatanywhere/GPT_API_free
虚拟机安装ubuntu,linux系统
linux系统安装教程可以百度
安装docker
# 安装依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
#建立Docker仓库 (映射仓库地址)
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 安装docker
yum install docker-ce docker-ce-clicontainerd.io
启动Docker并开机启动
systemctl start docker
systemctl enable docker.service
拉取镜像
docker pull yidadaa/chatgpt-next-web
部署容器
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY="sk-你的key" \
-e BASE_URL=https://api.chatanywhere.com.cn \
yidadaa/chatgpt-next-web
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
浏览器访问
查询ip命令可用
ifconfig
避坑指南
领取api网站打不开的用这个
常见错误
解决方法1(推荐)
这是因为你手动部署的时候api-key 填错了
报 to many request 如何解决
这是因为api作者提供的请求太多导致的,如果平时使用量较大,可以选择openai白嫖地址