jcrodriguez1989/chatgpt

Error in gpt_get_completions

Shunsenhuang-123 opened this issue · 1 comments

Dear Juan,
I confronted an error during using chatgpt package,
the error is "

> cat(ask_chatgpt("What do you think about R language?")) *** ChatGPT input: What do you think about R language? Error in gpt_get_completions(question, messages = chat_session_messages) : list(message = "Incorrect API key provided: sk-7jyy9***************************************PebN. You can find your API key at https://platform.openai.com/account/api-keys.", type = "invalid_request_error", param = NULL, code = "invalid_api_key") --   > | > > " but I am sure the API key is still valid, how can I fix this error?

Thank you!
best wishes,
Shunsen

Hi @Shunsenhuang-123 ,
this is an issue with your API key, or your key permissions. This needs to be solved in https://openai.com/ settings.
A possibility is that you have not set your billing details there. I can't really know, as this issue is external to this R package.
Best,