Closed KronosTheLate closed 2 months ago
Would you mind starting a temp environment and running it again? Make sure that you can see the ENV["OPENAI_API_KEY"] and that there is no typo, before you import the package.
That's the most common mistake.
An easy check if the package loaded it correctly is if it shows up in PromptingTools.OPENAI_API_KEY
.
There was a bug in past versions where people started the package before they set the ENV and Julia was for whatever reason precompiling the get(ENV..) call as well, so the only solution was to get rid of the cache (precompile again, upgrade version, manually delete the cache) - see the FAQ note.
But nowadays I split the get(ENV,..) in two steps to prevent Julia from inlining/precompiling it. No one has reported the issue since that fix.
I am not getting a different error message, which states that I have exceeded my current quota. I assumed that since I can use ChatGPT in the browser, I could also make requests via this interface for free. Is that wrong?
Ah, good! That means that the api key issue is gone. Which of the steps above resolved it for you?
On your current error, it's common for new / non-paying users. It's very similar to this error: https://siml.earth/PromptingTools.jl/dev/frequently_asked_questions#Getting-an-error-%22Rate-limit-exceeded%22-from-OpenAI?
But it's likely because you don't have any prepaid credit in your OpenAI account.
I'd suggest prepaying $5 credit: https://help.openai.com/en/articles/8264644-what-is-prepaid-billing
I can use chat.openai.com/ freely. Are the rules different when accessed through this package? I just assumed that as long as I kept to normal usage and only the free models, I did not have to whip out a credit card...
Looking at the billing information with OpenAI, I can see the following:
Which makes it clear that my chatGPT account is not reflected by that information, indicating that the two accounts have separate statuses. That helps explain why I can freely make requests online, but not via the OpenAI API. I do not plan on paying for this when I can freely use the online service.
To keep this confusion from happening again, perhaps the getting started section could mention that you have to pay to get started?
Following the getting started page, I have done the following: 1) Add my Open AI API key to the global
ENV
dictionary in mystartup.jl
2) InstallPromtingTools
3) Runai"Hello!"
This results in the following error:
Despite the fact that the environment variable is set:
Have I done something wrong, or should it be working at this point? I could use some help figuring out what I am missing to get things working...
Versions: