go-chatgpt-api 不向 ARKOSE_TOKEN_URL 发送请求就返回 Failed to get arkose token.
Yongqi-Zhuo opened this issue · 1 comments
Yongqi-Zhuo commented
我采用了这个项目,并且将其写入了 compose.yaml
。我的配置如下:
services:
arkoselabs_token_api.get:
container_name: arkoselabs_token_api.get
image: 24802117/arkoselabs_token_api.get:latest
environment:
db: false
http_proxy: http://host.docker.internal:7890
volumes:
- type: bind
source: ./chat.openai.com.har
target: /home/app/chat.openai.com.har
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
go-chatgpt-api:
container_name: go-chatgpt-api
image: linweiyuan/go-chatgpt-api
ports:
- 127.0.0.1:8089:8080
environment:
- TZ=Asia/Shanghai
- PROXY=http://host.docker.internal:7890
- ARKOSE_TOKEN_URL=http://arkoselabs_token_api.get:8081/token/
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
depends_on:
- arkoselabs_token_api.get
在 docker compose up
并使用 chatgpt-mirai-qq-bot
发送一条请求后,得到的输出是:
[+] Running 2/0
✔ Container arkoselabs_token_api.get Created 0.0s
✔ Container go-chatgpt-api Created 0.0s
Attaching to arkoselabs_token_api.get, go-chatgpt-api
arkoselabs_token_api.get | config.Instance().DB false
arkoselabs_token_api.get | Listening on port 8081
go-chatgpt-api | INFO[0000] PROXY: http://host.docker.internal:7890
go-chatgpt-api | INFO[0000] Service go-chatgpt-api is ready.
go-chatgpt-api | [GIN] 2023/09/11 - 20:47:28 | 200 | 632.518724ms | 192.168.144.1 | GET "/chatgpt/backend-api/conversations?offset=0&limit=1"
go-chatgpt-api | [GIN] 2023/09/11 - 20:47:28 | 200 | 636.209567ms | 192.168.144.1 | GET "/api/conversations?offset=0&limit=1"
go-chatgpt-api | INFO[0016] gpt-4
go-chatgpt-api | WARN[0017] Failed to get arkose token.
go-chatgpt-api | [GIN] 2023/09/11 - 20:47:37 | 403 | 447.040899ms | 192.168.144.1 | POST "/chatgpt/backend-api/conversation"
go-chatgpt-api | [GIN] 2023/09/11 - 20:47:37 | 403 | 447.167781ms | 192.168.144.1 | POST "/api/conversation"
这说明 arkoselabs_token_api.get
并未被请求。与之对比,如果 docker exec -it go-chatgpt-api sh
并且手动发送一条对 Arkose Token 的请求的话,是可以成功的
/app # echo $ARKOSE_TOKEN_URL
http://arkoselabs_token_api.get:8081/token/
/app # wget "http://arkoselabs_token_api.get:8081/token/"
Connecting to arkoselabs_token_api.get:8081 (192.168.144.2:8081)
saving to 'index.html'
index.html 100% |*********************************************************************************************************************************************| 1177 0:00:00 ETA
'index.html' saved
/app # cat index.html
{"token":"2061783d......
并且此时 compose 的输出如下
arkoselabs_token_api.get | clientIP: arkoselabs_token_api.get:8081 192.168.144.3
arkoselabs_token_api.get | err <nil>
arkoselabs_token_api.get | [GIN] 2023/09/11 - 20:57:35 | 200 | 554.726228ms | 192.168.144.3 | GET "/token"
由此可见,应该是 go-chatgpt-api
未对 ARKOSE_TOKEN_URL
发起请求。由于相关代码中 err
的内容未被输出,我无法自行 debug 出问题所在。请求帮助。
所有的程序版本均已更新至最新。
linweiyuan commented
已修复:0a485e8