Closed coolsd closed 1 year ago
尝试更改 config:设置 chatgpt_base_url 为 http://<你的公网ip>:6060/
修改以后,一直在思考 重新创建会话 提示 获取回复失败 [1008] 当前用户已有对话等待回复,不能再次请求
提供:go-chatgpt-api容器日志,以及cws日志
go-chatgpt-api
[31m2023/04/17 11:04:33 [Recovery] 2023/04/17 - 11:04:33 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/webdriver/refresh.go:26 (0x7afa18)
/app/main.go:21 (0x7b4795)
/usr/local/go/src/runtime/panic.go:884 (0x434772)
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/api/chatgpt/chatgpt.go:165 (0x7b0e1d)
/app/api/chatgpt/chatgpt.go:145 (0x7b080b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4237)
/app/middleware/headercheck.go:20 (0x7b413f)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4813)
/app/main.go:24 (0x7b47ff)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79b621)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 (0x79b60c)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79a746)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 (0x79a729)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7997ca)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 (0x799451)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 (0x7990fc)
/usr/local/go/src/net/http/server.go:2936 (0x6549f5)
/usr/local/go/src/net/http/server.go:1995 (0x651311)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x466960)
[0m
[31mERRO[0m[0000] [1;31mPlease make sure chatgpt proxy service is running[0m
[31mERRO[0m[0002] [1;31mselenium error: panic, need to create a new session and refresh[0m
[31m2023/04/17 11:05:27 [Recovery] 2023/04/17 - 11:05:27 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/webdriver/refresh.go:26 (0x7afa18)
/app/main.go:21 (0x7b4795)
/usr/local/go/src/runtime/panic.go:884 (0x434772)
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/api/chatgpt/chatgpt.go:74 (0x7b042f)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4237)
/app/middleware/headercheck.go:20 (0x7b413f)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4813)
/app/main.go:24 (0x7b47ff)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79b621)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 (0x79b60c)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79a746)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 (0x79a729)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7997ca)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 (0x799451)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 (0x7990fc)
/usr/local/go/src/net/http/server.go:2936 (0x6549f5)
/usr/local/go/src/net/http/server.go:1995 (0x651311)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x466960)
[0m
[GIN] 2023/04/17 - 11:05:27 |[97;41m 500 [0m| 1.322548ms | 172.17.0.1 |[97;44m GET [0m "/conversations?offset=0&limit=80"
[31mERRO[0m[0010] [1;31mselenium error: panic, need to create a new session and refresh[0m
[31m2023/04/17 11:05:35 [Recovery] 2023/04/17 - 11:05:35 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/webdriver/refresh.go:26 (0x7afa18)
/app/main.go:21 (0x7b4795)
/usr/local/go/src/runtime/panic.go:884 (0x434772)
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/api/chatgpt/chatgpt.go:165 (0x7b0e1d)
/app/api/chatgpt/chatgpt.go:145 (0x7b080b)
[GIN] 2023/04/17 - 11:05:35 |[97;41m 500 [0m| 799.286µs | 172.17.0.1 |[97;46m POST [0m "/conversation"
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4237)
/app/middleware/headercheck.go:20 (0x7b413f)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4813)
/app/main.go:24 (0x7b47ff)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79b621)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 (0x79b60c)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79a746)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 (0x79a729)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7997ca)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 (0x799451)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 (0x7990fc)
/usr/local/go/src/net/http/server.go:2936 (0x6549f5)
/usr/local/go/src/net/http/server.go:1995 (0x651311)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x466960)
[0m
[31mERRO[0m[0020] [1;31mselenium error: panic, need to create a new session and refresh[0m
[GIN] 2023/04/17 - 11:05:46 |[97;41m 500 [0m| 587.495µs | 172.17.0.1 |[97;46m POST [0m "/conversation"
[31m2023/04/17 11:05:46 [Recovery] 2023/04/17 - 11:05:46 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/webdriver/refresh.go:26 (0x7afa18)
/app/main.go:21 (0x7b4795)
/usr/local/go/src/runtime/panic.go:884 (0x434772)
/usr/local/go/src/runtime/panic.go:260 (0x44ad1c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x44acec)
/app/api/chatgpt/chatgpt.go:165 (0x7b0e1d)
/app/api/chatgpt/chatgpt.go:145 (0x7b080b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4237)
/app/middleware/headercheck.go:20 (0x7b413f)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7b4813)
/app/main.go:24 (0x7b47ff)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79b621)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 (0x79b60c)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x79a746)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 (0x79a729)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x7997ca)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 (0x799451)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 (0x7990fc)
/usr/local/go/src/net/http/server.go:2936 (0x6549f5)
/usr/local/go/src/net/http/server.go:1995 (0x651311)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x466960)
[0m
CWS
2023/04/17 19:05:27.488 INFO: [uvicorn.error] Started server process [1]
2023/04/17 19:05:27.488 INFO: [uvicorn.error] Waiting for application startup.
2023/04/17 19:05:27.499 INFO: [alembic.runtime.migration] Context impl SQLiteImpl.
2023/04/17 19:05:27.500 INFO: [alembic.runtime.migration] Will assume non-transactional DDL.
2023/04/17 19:05:27.506 INFO: [cws.main] database initialized
2023/04/17 19:05:27.507 DEBUG: [cws.utils.store_statistics] loading statistics from /data/statistics.json
2023/04/17 19:05:27.507 INFO: [cws.utils.store_statistics] Requests statistics loaded.
2023/04/17 19:05:27.528 INFO: [cws.utils.create_user] Create User coolsd Error: Username already exists
2023/04/17 19:05:27.534 INFO: [cws.main] Using http://23.224.4.82:6060/ as ChatGPT base url
2023/04/17 19:05:27.535 INFO: [cws.utils.sync_conversations] Syncing conversations...
2023/04/17 19:05:27.547 ERROR: [cws.utils.sync_conversations] Fetch conversation error (ChatGPTError): OpenAI 500:
2023/04/17 19:05:27.548 WARNING: [cws.utils.sync_conversations] Sync conversations on startup failed!
2023/04/17 19:05:27.548 INFO: [cws.main] Sync conversations regularly enabled, will sync conversations every 12 hours.
2023/04/17 19:05:27.550 INFO: [uvicorn.error] Application startup complete.
2023/04/17 19:05:27.551 INFO: [uvicorn.error] Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
2023/04/17 19:05:29.472 INFO: [cws.access] 125.114.7.87:0 | POST /system/server_logs HTTP/1.1 | 200 OK | 23 ms
2023/04/17 19:05:30.506 INFO: [cws.access] 125.114.7.87:0 | GET /user/me HTTP/1.1 | 200 OK | 7 ms
2023/04/17 19:05:30.886 INFO: [cws.access] 125.114.7.87:0 | GET /conv?fetch_all=false HTTP/1.1 | 200 OK | 22 ms
2023/04/17 19:05:35.624 INFO: [uvicorn.error] ('125.114.2.29', 0) - "WebSocket /conv" [accepted]
2023/04/17 19:05:35.627 INFO: [uvicorn.error] connection open
2023/04/17 19:05:35.630 DEBUG: [cws.api.routers.chat] coolsd connected to websocket
2023/04/17 19:05:35.817 ERROR: [cws.api.routers.chat] OpenAI: (code: 500)
2023/04/17 19:05:35.818 DEBUG: [cws.api.routers.chat] terminated ask None (ChatModels.default) because of error
2023/04/17 19:05:35.974 INFO: [uvicorn.error] connection closed
2023/04/17 19:05:36.129 INFO: [cws.access] 125.114.7.87:0 | GET /user/me HTTP/1.1 | 200 OK | 6 ms
2023/04/17 19:05:40.278 INFO: [cws.access] 125.114.7.87:0 | GET /user/me HTTP/1.1 | 200 OK | 8 ms
2023/04/17 19:05:40.532 INFO: [cws.access] 125.114.7.87:0 | GET /conv?fetch_all=false HTTP/1.1 | 200 OK | 23 ms
2023/04/17 19:05:46.090 INFO: [uvicorn.error] ('125.114.2.29', 0) - "WebSocket /conv" [accepted]
2023/04/17 19:05:46.092 INFO: [uvicorn.error] connection open
2023/04/17 19:05:46.096 DEBUG: [cws.api.routers.chat] coolsd connected to websocket
2023/04/17 19:05:46.281 ERROR: [cws.api.routers.chat] OpenAI: (code: 500)
2023/04/17 19:05:46.282 DEBUG: [cws.api.routers.chat] terminated ask None (ChatModels.default) because of error
2023/04/17 19:05:46.444 INFO: [uvicorn.error] connection closed
2023/04/17 19:05:46.600 INFO: [cws.access] 125.114.7.87:0 | GET /user/me HTTP/1.1 | 200 OK | 8 ms
尝试把 config 中的 chatgpt_base_url 设置成 http://你的公网ip:6060/
获取回复失败 [1001] ChatGPT返回错误
设置的公网也这样1014
尝试把config中的chatgpt_base_url设置成http://你的公网ip:6060/
CF_CLEARANCE and USER_AGENT environment variables are required
我用一台新的机器重新部署 提示 ERROR: for chatgpt-share Error: image moeakwak/chatgpt-web-share:latest not found ERROR: Error: image moeakwak/chatgpt-web-share:latest not found 大佬是在更新中吗
wiki更新了一些FAQ以及排查指南。只能说这个部署细节比较多,需要仔细一点。目前仍然可用。
1014这个问题解决了吗
1014之类的问题不是项目本身的问题,一部分是配置不对,一部分是网络、账号和token问题
获取回复失败 [1014] HTTP错误
后台日志
config 文件
docker
8066端口已经开放