Chanzhaoyu / chatgpt-web

用 Express 和 Vue3 搭建的 ChatGPT 演示网页
MIT License
31.5k stars 11.21k forks source link

大家的反代还正常吗 #1465

Closed zhaojie199512 closed 1 year ago

zhaojie199512 commented 1 year ago

按照大佬的https://github.com/acheong08/ChatGPT-Proxy-V4自建了一个反代,之前一直正常使用,现在突然不行了,看日志是被cf拦截了,没有认证通过,有没有还能正常使用反代的小伙伴呀,用大佬的https://bypass.churchless.tech/api/conversation也不行,就很难受。

zhaojie199512 commented 1 year ago

[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

[GIN-debug] GET /ping --> main.main.func2 (3 handlers) [GIN-debug] GET /api/path --> main.proxy (3 handlers) [GIN-debug] POST /api/path --> main.proxy (3 handlers) [GIN-debug] PUT /api/path --> main.proxy (3 handlers) [GIN-debug] PATCH /api/path --> main.proxy (3 handlers) [GIN-debug] HEAD /api/path --> main.proxy (3 handlers) [GIN-debug] OPTIONS /api/path --> main.proxy (3 handlers) [GIN-debug] DELETE /api/path --> main.proxy (3 handlers) [GIN-debug] CONNECT /api/path --> main.proxy (3 handlers) [GIN-debug] TRACE /api/*path --> main.proxy (3 handlers) [GIN-debug] POST /admin/update --> main.main.func3 (3 handlers) 2023/04/16 04:16:16 net.Listen error: listen tcp :8080: bind: address already in use root@VM-0-10-ubuntu:/home/ChatGPT-Proxy-V4# ChatGPT-Proxy-V4 [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

[GIN-debug] GET /ping --> main.main.func2 (3 handlers) [GIN-debug] GET /api/path --> main.proxy (3 handlers) [GIN-debug] POST /api/path --> main.proxy (3 handlers) [GIN-debug] PUT /api/path --> main.proxy (3 handlers) [GIN-debug] PATCH /api/path --> main.proxy (3 handlers) [GIN-debug] HEAD /api/path --> main.proxy (3 handlers) [GIN-debug] OPTIONS /api/path --> main.proxy (3 handlers) [GIN-debug] DELETE /api/path --> main.proxy (3 handlers) [GIN-debug] CONNECT /api/path --> main.proxy (3 handlers) [GIN-debug] TRACE /api/*path --> main.proxy (3 handlers) [GIN-debug] POST /admin/update --> main.main.func3 (3 handlers) 2023/04/16 04:16:34 97427 :8080 Got response: 403 Forbidden Error: 403 Forbidden

zynkchen commented 1 year ago

一样情况

zynkchen commented 1 year ago

换另外一个反代可以用

foamzou commented 1 year ago

换另外一个反代可以用

有啥可用的反代,大伙分享下?cc @zynkchen

pepperdog999 commented 1 year ago

同问,我试了一下社区常用的两个反代都不行了哦。

LOG1997 commented 1 year ago

两个代理都挂了似乎

wwlmm commented 1 year ago

看来access token的方式 就要完蛋了

bigSmartisan commented 1 year ago

openai那边升级了验证方式,v1的反代炸了

tianwen-j commented 1 year ago

openai那边升级了验证方式,v1的反代炸了

这可真是一个令人不愉快的消息

LOG1997 commented 1 year ago

只能使用apikey的方式咯

linweiyuan commented 1 year ago

https://github.com/Chanzhaoyu/chatgpt-web/issues/1150

其实我做了个自建代理,开源的,虽然没有社区的稳定,但是今天也还能用,有兴趣的可以自己尝试一下,可以当作一个临时的解决方案,等他们修复了,再用他们的(没有特别蹭热度的意思)

如果服务器没有被封 IP:

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
    depends_on:
      - chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

如果封了,也就是 Access denied

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped
Kikyo-chan commented 1 year ago

不想换VPS或IP的情况下,只有一个方案,就是在你目前的vps的ip套上一层warp,可以参考某个大神的方案: “WARP多功能VPS一键脚本,支持纯IPV4、纯IPV6的VPS直接安装,主流linux系统均支持 https://github.com/yonggekkk/warp-yg

e5sub commented 1 year ago

不想换VPS或IP的情况下,只有一个方案,就是在你目前的vps的ip套上一层warp,可以参考某个大神的方案: “WARP多功能VPS一键脚本,支持纯IPV4、纯IPV6的VPS直接安装,主流linux系统均支持 https://github.com/yonggekkk/warp-yg

没用的,默认就走反代,这鸡肋的反代也不知道哪里删除

chaoticjoy commented 1 year ago

1150

其实我做了个自建代理,开源的,虽然没有社区的稳定,但是今天也还能用,有兴趣的可以自己尝试一下,可以当作一个临时的解决方案,等他们修复了,再用他们的(没有特别蹭热度的意思)

如果服务器没有被封 IP:

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
    depends_on:
      - chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

如果封了,也就是 Access denied

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

显示错误:request to http://go-chatgpt-api:8080/conversation failed, reason: getaddrinfo EAI_AGAIN go-chatgpt-api

linweiyuan commented 1 year ago

@chaoticjoy 如果你用 docker 而不是 compose,需要在同一个网络,参考这个:https://github.com/Chanzhaoyu/chatgpt-web/issues/1466#issuecomment-1510389765

chaoticjoy commented 1 year ago

我用上面的warp的docker-compose.ylm生成的目前还没找到错误原因

linweiyuan commented 1 year ago

我用上面的warp的docker-compose.ylm生成的目前还没找到错误原因

go-chatgpt-api 的日志有提示 Welcome to ChatGPT 吗?

chaoticjoy commented 1 year ago
version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

Attaching to chatgpt-proxy-server, chatgpt-proxy-server-warp, go-chatgpt-api, chatgpt-web_app_1 chatgpt-proxy-server | exec ./undetected_chromedriver: exec format error chatgpt-proxy-server-warp | exec /bin/bash: exec format error go-chatgpt-api | exec /app/go-chatgpt-api: exec format error app_1 | app_1 | > chatgpt-web-service@1.0.0 prod /app app_1 | > node ./build/index.mjs app_1 | chatgpt-proxy-server-warp exited with code 1 chatgpt-proxy-server-warp | exec /bin/bash: exec format error chatgpt-proxy-server-warp | exec /bin/bash: exec format error chatgpt-proxy-server-warp | exec /bin/bash: exec format error

linweiyuan commented 1 year ago

@chaoticjoy 是 arm 的机器?恐怕暂不支持,参考:https://github.com/linweiyuan/go-chatgpt-api/issues/9

957955071 commented 1 year ago

@linweiyuan 大神,我用你的这个方法: docker network create chatgpt docker run --name chatgpt-proxy-server --restart unless-stopped --network chatgpt -d linweiyuan/chatgpt-proxy-server docker run --name go-chatgpt-api --restart unless-stopped --network chatgpt -e GIN_MODE=release -e CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515 -d linweiyuan/go-chatgpt-api docker run --name app --restart unless-stopped --network chatgpt -p 3002:3002 -e OPENAI_ACCESS_TOKEN=accessToken -e API_REVERSE_PROXY=http:/go-chatgpt-api:8080/conversation -d chenzhaoyu94/chatgpt-web

出现了这个:fetch failed 后台docker日志是:TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11413:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fetchSSE (file:///app/node_modules/.pnpm/chatgpt@5.1.2/node_modules/chatgpt/build/index.js:46:15) { cause: Error: getaddrinfo ENOTFOUND go-chatgpt-api at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'go-chatgpt-api' } }

chaoticjoy commented 1 year ago

@chaoticjoy 是 arm 的机器?恐怕暂不支持,参考:linweiyuan/go-chatgpt-api#9

对,是arm机器,我换个amd试试,谢谢

linweiyuan commented 1 year ago

@957955071 按照上面的命令,理论上不应该出现这个错

其实最好用 compose,如果用上面的 docker 命令,要确保 token 换掉了

先还原现场,然后执行一步后最好等个几秒,再执行下一步,重新试下看行不行

957955071 commented 1 year ago

@957955071 按照上面的命令,理论上不应该出现这个错

其实最好用 compose,如果用上面的 docker 命令,要确保 token 换掉了

先还原现场,然后执行一步后最好等个几秒,再执行下一步,重新试下看行不行

重新操作后,出现新的错误:[OpenAI] 服务器繁忙,请稍后再试 | Internal Server Error statusCode: 500, statusText: 'Internal Server Error',很奇怪哈

linweiyuan commented 1 year ago

@957955071 需要看下 go-chatgpt-api 的日志

Gavenvincent commented 1 year ago

1150

其实我做了个自建代理,开源的,虽然没有社区的稳定,但是今天也还能用,有兴趣的可以自己尝试一下,可以当作一个临时的解决方案,等他们修复了,再用他们的(没有特别蹭热度的意思)

如果服务器没有被封 IP:

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
    depends_on:
      - chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

如果封了,也就是 Access denied

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

你好,这里API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation

的http:/就是单个/吗?还是需要改成双/ ?

957955071 commented 1 year ago

Please make sure chatgpt proxy service is running panic: runtime error: invalid memory address or nil pointer dereference

linweiyuan commented 1 year ago

@Gavenvincent 不好意思打漏了,双/

linweiyuan commented 1 year ago

Please make sure chatgpt proxy service is running�[0m panic: runtime error: invalid memory address or nil pointer dereference

顺序要从上到下启动,因为有依赖,还有要确保这些 docker 服务都在同一个网络

luyiwind commented 1 year ago

1150

其实我做了个自建代理,开源的,虽然没有社区的稳定,但是今天也还能用,有兴趣的可以自己尝试一下,可以当作一个临时的解决方案,等他们修复了,再用他们的(没有特别蹭热度的意思)

如果服务器没有被封 IP:

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
    depends_on:
      - chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

如果封了,也就是 Access denied

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

刚刚测试你这个可以用

957955071 commented 1 year ago

@linweiyuan cause: Error: connect ECONNREFUSED 172.18.0.3:8080 又出现了这个

musha233 commented 1 year ago

1150

其实我做了个自建代理,开源的,虽然没有社区的稳定,但是今天也还能用,有兴趣的可以自己尝试一下,可以当作一个临时的解决方案,等他们修复了,再用他们的(没有特别蹭热度的意思)

如果服务器没有被封 IP:

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
    depends_on:
      - chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

如果封了,也就是 Access denied

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web
    ports:
      - 3002:3002
    environment:
      OPENAI_API_KEY:
      OPENAI_ACCESS_TOKEN: accessToken
      OPENAI_API_BASE_URL:
      OPENAI_API_MODEL:
      API_REVERSE_PROXY: http:/go-chatgpt-api:8080/conversation
      AUTH_SECRET_KEY:
      MAX_REQUEST_PER_HOUR: 0
      TIMEOUT_MS: 60000
      SOCKS_PROXY_HOST:
      SOCKS_PROXY_PORT:
      HTTPS_PROXY:
    depends_on:
      - go-chatgpt-api

  go-chatgpt-api:
    container_name: go-chatgpt-api
    image: linweiyuan/go-chatgpt-api
    environment:
      - GIN_MODE=release
      - CHATGPT_PROXY_SERVER=http://chatgpt-proxy-server:9515
      - NETWORK_PROXY_SERVER=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server:
    container_name: chatgpt-proxy-server
    image: linweiyuan/chatgpt-proxy-server
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

你好,docker-compose部署报错request to http://go-chatgpt-api:8080/conversation failed, reason: connect ECONNREFUSED 192.168.112.3:8080

go-chatgpt-api | ERRO[0440] Failed to handle captcha: timeout after 1m0.033270272s go-chatgpt-api | ERRO[0838] Failed to handle captcha: timeout after 2m15.133635841s go-chatgpt-api | ERRO[1318] Failed to handle captcha: timeout after 3m8.411054497s

913966691 commented 1 year ago

上面的好像都gg了,还有新的么?

chijiao commented 1 year ago

有自己搭建这个反向代理的教程吗

zengwk2005 commented 1 year ago

goroutine 36 [running]: github.com/linweiyuan/go-chatgpt-api/webdriver.Refresh.func1() /app/webdriver/refresh.go:13 +0x2b created by github.com/linweiyuan/go-chatgpt-api/webdriver.Refresh /app/webdriver/refresh.go:12 +0x6a ERRO[0000] Please make sure chatgpt proxy service is running INFO[0001] Missing access token
[GIN] 2023/04/17 - 04:09:07 | 403 | 64.797µs | 172.29.76.1 | GET "/" INFO[0011] Missing access token
[GIN] 2023/04/17 - 04:09:16 | 403 | 67.71µs | 172.29.76.1 | GET "/" [GIN] 2023/04/17 - 04:09:39 | 403 | 64.326µs | 172.29.76.1 | GET "/" INFO[0033] Missing access token
INFO[0037] Missing access token
[GIN] 2023/04/17 - 04:09:43 | 403 | 68.457µs | 172.29.76.1 | GET "/" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x138 pc=0x7af96b]

cicin411 commented 1 year ago

https://chat.gateway.do/api/conversation

可以先顶一顶。

麻烦问一下大佬,用了这个之后,使用GPT-4的话,只能输出 15s 的回复,然后必然断掉。不知道什么原因。

hbelove commented 1 year ago

https://chat.gateway.do/api/conversation

可以先顶一顶。 大佬,报这个错request to https://chat.gateway.do/api/conversation failed, reason: read ECONNRESET

hbelove commented 1 year ago

https://chat.gateway.do/api/conversation 可以先顶一顶。 大佬,报这个错request to https://chat.gateway.do/api/conversation failed, reason: read ECONNRESET

网络问题吧,开个梯子再试试

不是网络问题,访问这个页面是file not found, 访问https://chat.gateway.do可以使用网页版

cicin411 commented 1 year ago

问题就是之前用的反向代理,就是本软件默认的那个,没发现有15秒截断的情况呀😯发自我的手机-------- 原始邮件 --------发件人: Neo Peng @.>日期: 2023年4月17日周一 12:47收件人: Chanzhaoyu/chatgpt-web @.>抄送: cicin @.>, Comment @.>主 题: Re: [Chanzhaoyu/chatgpt-web] 大家的反代还正常吗 (Issue #1465)

https://chat.gateway.do/api/conversation 可以先顶一顶。

麻烦问一下大佬,用了这个之后,使用GPT-4的话,只能输出 15s 的回复,然后必然断掉。不知道什么原因。

从你描述来看,你的client timeout应该是15s。你可以看看你client的文档,看能否设置timeout。

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

hbelove commented 1 year ago

https://chat.gateway.do/api/conversation 可以先顶一顶。 大佬,报这个错request to https://chat.gateway.do/api/conversation failed, reason: read ECONNRESET

网络问题吧,开个梯子再试试

不是网络问题,访问这个页面是file not found, 访问https://chat.gateway.do可以使用网页版

这个方法是POST的,你直接GET访问是不行的。

app_1  | POST https://chat.gateway.do/api/conversation {
app_1  |   body: {
app_1  |     action: 'next',
app_1  |     messages: [ [Object] ],
app_1  |     model: 'text-davinci-002-render-sha',
app_1  |     parent_message_id: '43af03af-911d-4b52-bc77-e54037fc540e'
app_1  |   },
app_1  |   headers: {
app_1  |     Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIscvsdgvswg'
app_1  |     'Content-Type': 'application/json'
app_1  |   }
app_1  | }
app_1  | FetchError: request to https://chat.gateway.do/api/conversation failed, reason: read ECONNRESET
app_1  |     at ClientRequest.<anonymous> (file:///app/node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/index.js:108:11)
app_1  |     at ClientRequest.emit (node:events:525:35)
app_1  |     at TLSSocket.socketErrorListener (node:_http_client:502:9)
app_1  |     at TLSSocket.emit (node:events:513:28)
app_1  |     at emitErrorNT (node:internal/streams/destroy:151:8)
app_1  |     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
app_1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
app_1  |   type: 'system',
app_1  |   errno: 'ECONNRESET',
app_1  |   code: 'ECONNRESET',
app_1  |   erroredSysCall: 'read'
app_1  | }

日志如上,那个Authorization: Bearer 是固定的一个前缀吗

chijiao commented 1 year ago

https://chat.gateway.do/api/conversation

可以先顶一顶。

[OpenAI] 提供错误的API密钥 | Incorrect API key provided 提示这个错误, 检查过 token 是没有问题的

hbelove commented 1 year ago

@pengzhile 奇怪,网页的使用token是可以的, 用这个仓库的docker不行

913966691 commented 1 year ago

自建代理也不行咧,有人解决了么?

GerardFinch commented 1 year ago

https://chat.gateway.do/api/conversation 可以先顶一顶。

[OpenAI] 提供错误的API密钥 | Incorrect API key provided 提示这个错误, 检查过 token 是没有问题的

image

是用来暂时顶替这个的。

蒟蒻送上感谢:>

cicin411 commented 1 year ago

问题就是之前用的反向代理,就是本软件默认的那个,没发现有15秒截断的情况呀😯发自我的手机-------- 原始邮件 --------发件人: Neo Peng @.**>日期: 2023年4月17日周一 12:47收件人: Chanzhaoyu/chatgpt-web @.**>抄送: cicin @.**>, Comment @.**>主 题: Re: [Chanzhaoyu/chatgpt-web] 大家的反代还正常吗 (Issue #1465) https://chat.gateway.do/api/conversation 可以先顶一顶。 麻烦问一下大佬,用了这个之后,使用GPT-4的话,只能输出 15s 的回复,然后必然断掉。不知道什么原因。 从你描述来看,你的client timeout应该是15s。你可以看看你client的文档,看能否设置timeout。 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

image image

你看,GPT4模型,这长度肯定超过15秒了吧。

排查了一圈,基本找到原因了 @pengzhile @Chanzhaoyu 我看有人也在本库下面反馈一样的问题,我也@一下作者。

问题如下:浏览器显示,回复内容总是在某一个时刻截断。 image

并且在前端的响应里面提示如下字样(非前端的锅): {"message":"Unexpected number in JSON at position 4","data":null,"status":"Fail"}

后端提示: SyntaxError: Unexpected number in JSON at position 4 at JSON.parse () at onMessage (d:\res\vue\cc-back\node_modules.pnpm\chatgpt@5.2.2\node_modules\chatgpt\build\index.js:622:47) at (d:\res\vue\cc-back\node_modules.pnpm\chatgpt@5.2.2\node_modules\chatgpt\build\index.js:62:7) at parseEventStreamLine (D:\res\vue\cc-back\node_modules.pnpm\eventsource-parser@1.0.0\node_modules\eventsource-parser\src\parse.ts:125:17) at Object.feed (D:\res\vue\cc-back\node_modules.pnpm\eventsource-parser@1.0.0\node_modules\eventsource-parser\src\parse.ts:101:28) at feed (d:\res\vue\cc-back\node_modules.pnpm\chatgpt@5.2.2\node_modules\chatgpt\build\index.js:84:12) at fetchSSE (d:\res\vue\cc-back\node_modules.pnpm\chatgpt@5.2.2\node_modules\chatgpt\build\index.js:100:7) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

加黑处,源码chatgpt-api这个库的标识位置处理不当 catchError之后直接reject退出了。。。 image 把这块先注释掉吧,期待原作者修复一下。

原库在这里 transitive-bullshit / chatgpt-api

@transitive-bullshit

xuhuaq commented 1 year ago

@linweiyuan 感谢,亲测可用,plus账号,gpt-4可用

ikiwihome commented 1 year ago

readme中的两个代理都用不了了,https://blognas.hwb0307.com/linux/docker/4201 参考这篇文章,自建代理,成功了。速度比第三方代理快多了而且安全

xuhuaq commented 1 year ago

readme中的两个代理都用不了了,https://blognas.hwb0307.com/linux/docker/4201 参考这篇文章,自建代理,成功了。速度比第三方代理快多了而且安全

省流:

“基于linweiyuan / go-chatgpt-api项目或linweiyuan/java-chatgpt-api项目。 。。。。一般来说,这些方法对VPS的IP纯净程度要求较高;但使用WARP的话对IP的纯净度要求应该会变低。总体上,自建反向代理的稳定性比一些公共地址更高。”

jsonxu commented 1 year ago

能不要代理吗?怎么设置?

GitHubChrisChen8035 commented 1 year ago

依然会提示 FetchError: request to http://172.17.0.1:8080/conversation failed, reason: connect ECONNREFUSED 172.17.0.1:8080 是哪里配置问题吗?