-
Notifications
You must be signed in to change notification settings - Fork 775
Error 429 : Too many requests #27
Comments
This error message suggests that you have sent too many requests to the server and have exceeded the rate limit. The server has responded with a 429 status code, indicating that you should slow down your requests. To solve this issue, you can try reducing the frequency of your requests or adding a delay between each request. You can also check if the server has an API documentation or a rate limit policy, which can provide guidance on the number of requests you can send in a given time period. Another option is to handle the 429 response code in your Python code and retry the request after a certain amount of time has passed. You can use the built-in Python time.sleep() function to pause your code for a specified number of seconds before retrying the request. |
`import requests,json,time headers = {"Content-Type": "application/json; charset=utf-8"} data = { Even with some time.sleep i got the same error. |
I encounter the same issue when trying to curl from python or from Java, i can only curl from a batch script. and it is only one single post request so i'm certain the issue is not that i actually send more requests than permitted |
I also encountered the same issue, where I did not encounter any errors while making a curl request, but when using code written in Golang, I faced problems. Even sending a single request was causing the same issue |
Probably a soft-request to not script it. |
You only made one request, which means the server replied with 429, but you just waited 5 seconds before printing it. |
this code solves problem in python: session = requests.Session()
payload = {"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "hello!"}]}
r = requests.post("https://chatgpt-api.shn.hk/v1/", headers = {'Content-Type': 'application/json'}, data= json.dumps(payload))
answer = json.loads(r.text, strict=False)["choices"][0]["message"]["content"] |
Same problem here OpenAI API responded: {
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
} |
It seems that it get a corrupted JSON... How to solve? Thank you: Traceback (most recent call last): |
I'm getting this on my first request |
me too |
Solved: $ curl https://chatgpt-api.shn.hk/v1/ \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello, how are you?"}]
}' --user-agent "undici" |
{
"error": {
"message": "Your access was terminated due to violation of our policies, please check your email for more information. If you believe this is in error and would like to appeal, please contact [email protected].",
"type": "access_terminated",
"param": null,
"code": null
}
} |
没钱了 no money yet |
Pretty much the same as https://github.com/acheong08/ShareGPT but not open source? I think a slight issue is a lack of contribution. |
contributions are welcome, just wait for code to be uploaded |
I think it is working for now |
{'error': 'No API keys found'} |
All API keys ran out of money. |
Hello, I send a request with python, but I got this error.
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html><title>429</title>429 Too Many Requests: 0
Bests Regards
The text was updated successfully, but these errors were encountered: