This project still works, but no more new features or bugfix, please use go-chatgpt-api.
Bypass Cloudflare using Playwright for Java to use ChatGPT API.
Also support official API (the way which using API key):
- Chat completion
Default is to use both ChatGPT mode and API mode, if you want to use API mode only, set CHATGPT=false
.
Support proxy setting, need to specify http
or socks5
manually.
If the LOG_LEVEL
is set to DEBUG
or INFO
, more logs will be printed, but as a result, the disk usage will be much higher.
chatgpt-proxy-server-warp
supports DEBUG
, INFO
, WARN
, ERROR
, OFF
. (This is not officially supported, just using a grep
, so the logs may not be too precise.)
services:
java-chatgpt-api:
container_name: java-chatgpt-api
image: linweiyuan/java-chatgpt-api
ports:
- 8080:8080
environment:
- CHATGPT=true
# - PROXY=
# - DEBUG=pw:api
restart: unless-stopped
If your IP is blocked, like "Access denied", try this (with Cloudflare WARP):
services:
java-chatgpt-api:
container_name: java-chatgpt-api
image: linweiyuan/java-chatgpt-api
ports:
- 8080:8080
environment:
- CHATGPT=true
- PROXY=socks5://chatgpt-proxy-server-warp:65535
# - DEBUG=pw:api
depends_on:
- chatgpt-proxy-server-warp
restart: unless-stopped
chatgpt-proxy-server-warp:
container_name: chatgpt-proxy-server-warp
image: linweiyuan/chatgpt-proxy-server-warp
environment:
- LOG_LEVEL=OFF
restart: unless-stopped
Java Swing GUI application: ChatGPT-Swing
Golang TUI application: go-chatgpt