OpenAI GPT-3 API error: Why do I still get the "You exceeded your current quota" error even though I set up a paid account (subscribed)?

huangapple go评论120阅读模式
英文:

OpenAI GPT-3 API error: Why do I still get the "You exceeded your current quota" error even though I set up a paid account (subscribed)?

问题

You received the error message "RateLimitError: You exceeded your current quota, please check your plan and billing details." because you may have exceeded the usage limit associated with your OpenAI subscription or API key. This error occurs when you've made too many requests within a given timeframe based on your subscription plan.

To resolve this issue, you should check your OpenAI subscription plan and billing details to ensure you have the necessary resources to make API requests. If you believe your subscription is in order and you're still encountering this error, you may want to reach out to OpenAI support for further assistance.

英文:

Why did I get RateLimitError: You exceeded your current quota, please check your plan and billing details.? I was subscribed, and this is my first request. I paid for my subscription.

Here is my code:

import openai
KEY = "mykeyhere it is checked over 10 times" //i tries to create new keys, not working, all times RATELIMITERROR
openai.api_key = KEY
def generate_response(text):
    response = openai.Completion.create(
        prompt=text,
        engine='text-davinci-003',
        max_tokens=100,
        temperature=0.7,
        n=1,
        stop=None,
        timeout=15
    )
    if response and response.choices:
        return response.choices[0].text.strip()
    else:
        return None

res = generate_response("Hello, how are you?")

print(res)

What did I do wrong, and why did my first request give this error?

答案1

得分: 1

生成一个新的API密钥,如果你的旧API密钥是在升级到付费计划之前生成的。

英文:

Generate a new API key if your old API key was generated before you upgraded to the paid plan.

huangapple
  • 本文由 发表于 2023年6月27日 18:26:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76563924.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定