1. Project address:
https://github.com/Chanzhaoyu/chatgpt-web
ChatGPTAPI uses gpt-3.5-turbo-0301 to emulate ChatGPT via the official OpenAI completion API (the most robust approach, but it's not free and doesn't use a model fine-tuned for chat) ChatGPTUnofficialProxyAPI uses an unofficial proxy server to access ChatGPT's
backend API, bypassing Cloudflare (uses real ChatGPT, very lightweight, but depends on third-party servers and has rate limits)
2. Start the project, use docker-compose to start the project
version: '3'
services:
app:
image: chenzhaoyu94/chatgpt-web # 总是使用 latest ,更新时重新 pull 该 tag 镜像即可
ports:
- 3002:3002
environment:
# 二选一
OPENAI_API_KEY: sk-xxx
# 二选一
OPENAI_ACCESS_TOKEN: xxx
# API接口地址,可选,设置 OPENAI_API_KEY 时可用
OPENAI_API_BASE_URL: xxx
# API模型,可选,设置 OPENAI_API_KEY 时可用
OPENAI_API_MODEL: xxx
# 反向代理,可选
API_REVERSE_PROXY: xxx
# 访问权限密钥,可选
AUTH_SECRET_KEY: xxx
# 超时,单位毫秒,可选
TIMEOUT_MS: 60000
# Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效
SOCKS_PROXY_HOST: xxx
# Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效
SOCKS_PROXY_PORT: xxx
# HTTPS 代理,可选,支持 http,https,socks5
HTTPS_PROXY: http://xxx:7890
docker-compose up -d
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eca262c45456 chenzhaoyu94/chatgpt-web "docker-entrypoint.s…" 7 seconds ago Up 6 seconds 0.0.0.0:3002->3002/tcp, :::3002->3002/tcp nodeworkspace-app-1
You can configure the verification code: xxx
has not configured the key and certificate display:
3. After the configuration is complete, it can be used
The effect is as follows, using the latest version of chatgpt 3.5