i still have 404 not found error
wqjuser opened this issue · comments
I've tried running the project on both my local windows computer and linux server, but both get a 404 page not found error, I don't know how or where it went wrong!
Here's the windows log:
cd .\ChatGPT-to-API
PS G:\ChatGPT-to-API> .\freechatgpt.exe
[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/07/21 20:56:07 24944 127.0.0.1:8080
[GIN] 2023/07/21 - 20:57:10 | 404 | 0s | 127.0.0.1 | GET "/v1/chat/completions"
[GIN] 2023/07/21 - 20:57:10 | 404 | 0s | 127.0.0.1 | GET "/favicon.ico"
Here's the linux log:
./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/07/21 13:07:46 752283 127.0.0.1:8080
[GIN] 2023/07/21 - 13:08:20 | 404 | 2.197µs | 192.9.134.22 | GET "/webapi/v1/chat/completions"
I don't know what the problem is.
supposed to be POST to /v1/chat/completions
supposed to be POST to /v1/chat/completions
it worked thanks