Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The requested endpoint (GET /v1/chat/completions) was not found #129

Open
wengyk opened this issue May 9, 2024 · 16 comments
Open

The requested endpoint (GET /v1/chat/completions) was not found #129

wengyk opened this issue May 9, 2024 · 16 comments

Comments

@wengyk
Copy link

wengyk commented May 9, 2024

I run "docker run -dp 3040:3040 pawanosman/chatgpt:latest",
then open "http://localhost:3040/v1/chat/completions" in chromium.
The following error message appears on the web page:

{
"status": false,
"error": {
"message": "The requested endpoint (GET /v1/chat/completions) was not found. please make sure to use "http://localhost:3040/v1\" as the base URL.",
"type": "invalid_request_error"
},
"support": "https://discord.pawan.krd"
}

@hu19940121
Copy link

If you open it directly in the browser, the request method is GET. You should use POST method to request this api.

@goga2k
Copy link

goga2k commented May 9, 2024

have the same error in docker

it started well

Starting the application...
2024-05-09 15:16:34 
2024-05-09 15:16:34 > chatgpt@1.0.0 start
2024-05-09 15:16:34 > tsc && node dist/app.js
2024-05-09 15:16:34 
2024-05-09 15:16:47 💡 Server is running at http://localhost:3040
2024-05-09 15:16:47 
2024-05-09 15:16:47 🔗 Local Base URL: http://localhost:3040/v1
2024-05-09 15:16:47 🔗 Local Endpoint: http://localhost:3040/v1/chat/completions
2024-05-09 15:16:47 
2024-05-09 15:16:47 🔗 Public Base URL: https://removed-governor-default-bits.trycloudflare.com/v1
2024-05-09 15:16:47 🔗 Public Endpoint: https://removed-governor-default-bits.trycloudflare.com/v1/chat/completions
2024-05-09 15:16:47 
2024-05-09 15:16:47 📝 Author: Pawan.Krd
2024-05-09 15:16:47 🌐 Discord server: https://discord.gg/pawan
2024-05-09 15:16:47 🌍 GitHub Repository: https://github.com/PawanOsman/ChatGPT
2024-05-09 15:16:47 💖 Don't forget to star the repository if you like this project!

but then I get an error: {"status":false,"error":{"message":"The requested endpoint (GET /v1/chat/completions) was not found. please make sure to use \"http://localhost:3040/v1\" as the base URL.","type":"invalid_request_error"},"support":"https://discord.pawan.krd"}

add an additional slash to the end of the base URL doesn't work

also tried to use to "http://localhost:3040/v1/chat/completions" instead of "http://localhost:3040/v1\chat/completions" - all result in the same error,

I've already tried use "http://localhost:3040/v1/" and "http://localhost:3040/v1\" - same error

i even tried to use the direct ip link,instead of localhost and get the same error, doesn't work anyway

@pqnhan
Copy link

pqnhan commented May 10, 2024

For me, it's the same.
Besides..

@dianavintila
Copy link

I have the same problem.

@ocdevcn
Copy link

ocdevcn commented May 10, 2024

散了吧,这玩意来不起,无论哪种方式都不行,除非能看到一篇可行的方案。

@pqnhan
Copy link

pqnhan commented May 10, 2024

Gotchas, you will need "clean" IP address to use this.
I've first tried on AWS but failed.
But now, it's worked.

image

@pqnhan
Copy link

pqnhan commented May 10, 2024

Works as expected
image

@ocdevcn
Copy link

ocdevcn commented May 11, 2024

Which deployment method did you use successfully? Where can the resulting API work? Thanks

@CodeDevNinja
Copy link

Gotchas, you will need "clean" IP address to use this. I've first tried on AWS but failed. But now, it's worked.

image

Gotchas, you will need "clean" IP address to use this. I've first tried on AWS but failed. But now, it's worked.

image

Gotchas, you will need "clean" IP address to use this. I've first tried on AWS but failed. But now, it's worked.

image

Did you mean the IP forbidden by OpenAI?
Does the local network work?
thx

@pqnhan
Copy link

pqnhan commented May 14, 2024

Which deployment method did you use successfully? Where can the resulting API work? Thanks

https://github.com/PawanOsman/ChatGPT/tree/main/docker-compose and https://github.com/PawanOsman/ChatGPT?tab=readme-ov-file#using-docker all work.

@pqnhan
Copy link

pqnhan commented May 14, 2024

@ocdevcn @CodeDevNinja

Cause ChatGPT uses CloudFlare, you need a "clean" IP address that doesn't fall into their filters.
They banned IPs from most cloud services, and sometime is resident IP addresses (also maybe some countries or regions, idk)

Hmm, basically, this project exploits ChatGPT web public session (non-login session), which is basically fragile.
If logging user sessions tokens can be used, may it'll be more stable.

@navhub007
Copy link

@ocdevcn @CodeDevNinja

Cause ChatGPT uses CloudFlare, you need a "clean" IP address that doesn't fall into their filters. They banned IPs from most cloud services, and sometime is resident IP addresses (also maybe some countries or regions, idk)

Hmm, basically, this project exploits ChatGPT web public session (non-login session), which is basically fragile. If logging user sessions tokens can be used, may it'll be more stable.

Thank you very much for answering my confusion. I think I should try more. I did use the computer room IP, but the IP I used can access https://chatgpt.com/ normally.

@pqnhan
Copy link

pqnhan commented May 14, 2024

Thank you very much for answering my confusion. I think I should try more. I did use the computer room IP, but the IP I used can access chatgpt.com normally.

Have you tried calling a POST Request to your own API Endpoint (http://127.0.0.1:3040/v1/chat/completions)?

Direct access from web browsers will not work because they use GET Request.
If you use a home network, you can try resetting the router to get a new public IP address and try again.

Cloudflare uses many different criteria to scan and filter requests that it considers "robotic".

curl http://127.0.0.1:3040/v1/chat/completions \
  -i -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
  }'

@9xcoder
Copy link

9xcoder commented May 15, 2024

Thank you very much for answering my confusion. I think I should try more. I did use the computer room IP, but the IP I used can access chatgpt.com normally.

Have you tried calling a POST Request to your own API Endpoint (http://127.0.0.1:3040/v1/chat/completions)?

Direct access from web browsers will not work because they use GET Request. If you use a home network, you can try resetting the router to get a new public IP address and try again.

Cloudflare uses many different criteria to scan and filter requests that it considers "robotic".

curl http://127.0.0.1:3040/v1/chat/completions \
  -i -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
  }'

I have same issue when call from curl
I am using docker to run this project
image

@jackiezhangcn
Copy link

seems it does NOT work for me

@Aldans
Copy link

Aldans commented May 26, 2024

The same problem, have any updates ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests