gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.5k stars 760 forks source link

API Key doesn't appear to be working #49

Closed DataScientistMSBA closed 1 year ago

DataScientistMSBA commented 1 year ago

I entered the API Key in the settings and chose it as the method and even after restarting the session and reopening the application itself I am getting the following error:

An error occurred. If this issue persists please clear your session token with ChatGPT: Reset session command and/or restart your Visual Studio Code. If you still experience issues, it may be due to outage on https://openai.com/ services.

gencay commented 1 year ago

@DataScientistMSBA @benzntech do you see an error message notification on your vs-code? That toast notification should have details of the exception. Could you share a screenshot of that?

DataScientistMSBA commented 1 year ago

@gencay I am not sure what it is that you're looking for. Can you clerify? I am getting the same error seen in @benzntech first screenshot

gencay commented 1 year ago

There should be a notification on the right bottom of your vs-code when there is a failure. Like this:

image

There should be the exception details printed on that error. Could you check that?

DataScientistMSBA commented 1 year ago

Here you go. Code 400 might be because the service seems to be down right now. Might be a different code once it's back online. 2023-01-11 11_41_25-Extension_ CodeGPT_ Boost your coding with ChatGPT - Untitled (Workspace) - Visu

gencay commented 1 year ago

@DataScientistMSBA did you attempt to change your api key after initial login? I have updated the marketplace since there was an issue with the Reset session command, where it wasn't clearing out the old API Keys unless you restart your vs-code. Could you upgrade your extension and retry?

gencay commented 1 year ago

I cannot reproduce the HTTP 400 error you're encountering. At the moment, since the OpenAI services are facing issues, HTTP 429 /503 is expected.

DataScientistMSBA commented 1 year ago

@gencay The API Key seems to be working now that I have updated the extention :) Thank you!

gencay commented 1 year ago

Thanks @DataScientistMSBA for verifying

LopesLs commented 1 year ago

I cannot reproduce the HTTP 400 error you're encountering. At the moment, since the OpenAI services are facing issues, HTTP 429 /503 is expected.

I am encountering an issue with utilizing the extension, as I am receiving the error message "Request failed with status code 429." The suggested solution is to continuously reset my token, however, this method has proven to be ineffective. This problem is preventing me from utilizing the full functionality of the extension.

image

gencay commented 1 year ago

@SmokeDevL http 429 error is expected if you are making too many requests for OpenAI to handle. Waiting for a while before you make another request is suggested solution by the OpenAI. This is also documented in Readme.

benzntech commented 1 year ago

The extension works fine with api method. There is some basic problem with this extension.

gencay commented 1 year ago

@benzntech what error are you seeing with my extension, 400 or 429?

It may also be related to using the same api key on both extensions.

I am still looking into it though.