AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

manually sets the key in the Settings interface, can't run task

Open linghongli opened this issue 1 year ago • 13 comments

The latest version manually sets the key in the Settings interface. When executing tasks, it always prompts "ERROR accessing OpenAI APIs. Please check your API key or try again later" to confirm that the key is correct. The previous version executed without any issues 123 22

linghongli avatar Apr 18 '23 01:04 linghongli

Can you double check your key? Seems to be working on my end. You can also check the console log for a potentially more detailed error

asim-shrestha avatar Apr 18 '23 03:04 asim-shrestha

Can you double check your key? Seems to be working on my end. You can also check the console log for a potentially more detailed error

The value of key has been confirmed multiple times and is correct. We have deployed two versions for comparative testing, and the latest version is consistent with the previous version. The old version has no issues. When saving the settings, there is no problem and it can be saved normally. However, when executing tasks, the key error “ERROR accessing OpenAI APIs. Please check your API key or try again later” will be reported. (Old version is normal) The console did not see any error messages. 4444

linghongli avatar Apr 18 '23 03:04 linghongli

I have the same problem

tianciBR avatar Apr 18 '23 04:04 tianciBR

It's possible that the OpenAI API has been restricted in China, which could be the reason for the problem. To ensure whether you have access to the OpenAI API in your local network, you may need to confirm it.

Sneezry avatar Apr 18 '23 05:04 Sneezry

I know there is a problem in this aspect, but I used the web page provided by the author to input my APIkey, which also cannot be used normally. Is this my personal reason

tianciBR avatar Apr 18 '23 05:04 tianciBR

If you set up your own API, I believe that your browser initiates requests to OpenAI instead of the website's backend, as it's logical to maintain your secrets on your own machine. So, if you're unable to connect to OpenAI from your local network, this could be the reason for the problem you're facing.

Sneezry avatar Apr 18 '23 05:04 Sneezry

Thank you for your answer. I will try again to find the answer to the question

tianciBR avatar Apr 18 '23 05:04 tianciBR

If you set up your own API, I believe that your browser initiates requests to OpenAI instead of the website's backend, as it's logical to maintain your secrets on your own machine. So, if you're unable to connect to OpenAI from your local network, this could be the reason for the problem you're facing.

Not for this reason, I have deployed two versions, old and new. The latest version has issues, while the old version is normal. It's not due to the key, nor is it due to network issues. If it's due to network issues, the old version cannot execute properly

linghongli avatar Apr 18 '23 05:04 linghongli

It is indeed due to the local network. After switching the network, it is normal. It's quite strange, the old version is indeed normal.

linghongli avatar Apr 18 '23 06:04 linghongli

Could you provide info on what old version and what new version you're running?

APiTJLillo avatar Apr 19 '23 01:04 APiTJLillo

I encountered the same issue and I'm in Singapore. Unlikely to be a network accessibility issue.

Update: I have 2 OpenAI accounts, I can guarantee that both accounts and keys are valid. However, 1 key always have the same bug. The other key works. It seems to be a account/key specific issue

tf-taxa avatar Apr 29 '23 09:04 tf-taxa

Unfortunately I too have this problem in the browser version... I inserted and changed with another key but the problem remains

morenokosta avatar May 10 '23 19:05 morenokosta

Hey so when you use your own key, you run all of the code and API calls on the client side. If the API is not available in your region (Which seems to be the cause for these) then you will unfortunately receive this error

asim-shrestha avatar May 10 '23 23:05 asim-shrestha

Hello @Sneezry @linghongli @tf-taxa @yourepicservices Please Try the new updates which may have resolved these if sill experiencing these issues feel free to reopen this or find a newer issue that has the same problems!!!!

jasangill1 avatar Jun 29 '23 21:06 jasangill1