irudnyts / openai

An R package-wrapper around OpenAI API
https://irudnyts.github.io/openai/
Other
164 stars 28 forks source link

Exceed current quota but none were used #58

Open allegropiano opened 5 months ago

allegropiano commented 5 months ago

I have set the open API key as follows:

Sys.setenv(OPENAI_API_KEY = 'XXXX')

And proceed to try this out but got the following error:

library(openai)

create_completion(

  • model = "babbage-002",
  • prompt = "Generate a question and an answer"
  • ) Error: OpenAI API request failed [429]:

You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.

I just logged on and check my quota and I am not over the quota at all? Is there another step that I need to do to try this out?

irudnyts commented 5 months ago

From my experience, if you register before certain point in time and did not use your quota, then it yield this error. I believe it has nothing to do with the package itself.

Btw, do not forget to replace XXXX with your actual key in Sys.setenv(OPENAI_API_KEY = 'XXXX').