karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.06k stars 116 forks source link

ChatGPT error: (HTTP/2 429) You exceeded your current quota, please check your plan and billing details. #93

Closed StackAllocator closed 11 months ago

StackAllocator commented 11 months ago

When I try to Send my GPT buffer, I get the error: ChatGPT error: (HTTP/2 429) You exceeded your current quota, please check your plan and billing details. I didn't find a way to troubleshoot my problem.

This is how my init.el looks like:

(defun clean-gpt-buffer ()
  (with-current-buffer "*ChatGPT*"
    (fill-paragraph)))

(add-hook 'gptel-post-response-hook 'clean-gpt-buffer)
;;; Use chatGPT inside Emacs
(use-package gptel
 :hook ((gptel-post-response . clean-gpt-buffer)) 
 :config
 (setq gptel-api-key "omitted"))

So it should be working fine, but I get this response error.. I assumed I didn't have to be using the paid version of ChatGPT.. (ChatGPT 4). Am I right or does one have to upgrade to use this package? If you know how to resolve this, please let me know. :+1:

karthink commented 11 months ago

Have you added a credit card to your OpenAI account?

minad commented 11 months ago

I am also getting this error with the 3.5 model. Did they cancel all the free plans?

karthink commented 11 months ago

I believe the free plans ended back in May, all plans are paid now.

StackAllocator commented 11 months ago

No I didn't add a credit card. Does that mean that I should have downloaded the package back in May to make it work and now only the paid version can be used with this package?

tshu-w commented 11 months ago

No I didn't add a credit card. Does that mean that I should have downloaded the package back in May to make it work and now only the paid version can be used with this package?

This has nothing to do with the gptel version, no matter which version you use, if you run out of free quota, you will have to pay openai for API usage.

You can just check it with the following command in terminal:

curl https://api.openai.com/v1/completions \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer $OPENAI_API_KEY" \
     -d '{"model": "text-davinci-003", "prompt": "Say this is a test", "temperature": 0, "max_tokens": 7}'
StackAllocator commented 11 months ago

Yeah I can't use the package then. Thanks. Should I close the issue?

tshu-w commented 11 months ago

Yes, I think gptel can't do much more, except for supporting other services/local models.

For your reference, here is a way to use chat2api with a risk of being banned. Use as your own risk: 1. Obtain an Access Token from either https://github.com/pengzhile/pandora#体验地址 or https://ai-20230626.fakeopen.com/auth. 2. Follow the instructions provided on https://github.com/pengzhile/pandora/issues/837.

bhepple commented 5 months ago

I just fell into this trap - it would be nice to add it to the FAQ as I think it's going to be a very frequent problem.

karthink commented 5 months ago

Added to FAQ, thanks @bhepple.

bhepple commented 5 months ago

Awesome!