This repository has been archived by the owner on Aug 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 378
ChatGPT-to-API doesn't work with socks5h proxy. #104
Comments
If not worked, you would not get |
But if I use the socks5 proxy, the test will give the following message: werner@X10DAi:~/Public/repo/github.com/acheong08/ChatGPT-to-API.git$ cat proxies.txt
socks5://127.0.0.1:18890
werner@X10DAi:~/Public/repo/github.com/acheong08/ChatGPT-to-API.git$ SERVER_PORT=18080 ./freechatgpt
[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.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /ping --> main.main.func1 (4 handlers)
[GIN-debug] PATCH /admin/password --> main.passwordHandler (5 handlers)
[GIN-debug] PATCH /admin/tokens --> main.tokensHandler (5 handlers)
[GIN-debug] PATCH /admin/puid --> main.puidHandler (5 handlers)
[GIN-debug] PATCH /admin/openai --> main.openaiHandler (5 handlers)
[GIN-debug] OPTIONS /v1/chat/completions --> main.optionsHandler (4 handlers)
[GIN-debug] POST /v1/chat/completions --> main.nightmare (5 handlers)
[GIN-debug] GET /v1/engines --> main.engines_handler (5 handlers)
[GIN-debug] GET /v1/models --> main.engines_handler (5 handlers)
2023/08/01 19:39:03 17950 127.0.0.1:18080
[GIN] 2023/08/01 - 19:39:22 | 200 | 5.21839729s | 127.0.0.1 | POST "/v1/chat/completions"
$ curl http://127.0.0.1:18080/v1/chat/completions -d '{"messages": [{"role": "user", "content": "Say this is a test!"}],"stream": true}'
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"This"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" is"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" a"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" test"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"!"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{},"index":0,"finish_reason":"stop"}]}
data: [DONE] And, obviously, the |
Bug with https://github.com/bogdanfinn/tls-client/. socks5h not supported afaik |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See below for more details:
werner@X10DAi:~/Public/repo/github.com/acheong08/ChatGPT-to-API.git$ cat proxies.txt socks5h://127.0.0.1:18890
Start it with:
werner@X10DAi:~/Public/repo/github.com/acheong08/ChatGPT-to-API.git$ SERVER_PORT=18080 ./freechatgpt
Test it with:
The message of ChatGPT-to-API is as follows:
The proxy itself works smoothly:
The text was updated successfully, but these errors were encountered: