Open phreshsprout opened 2 years ago
Hey! a 400 error means the api key might be in there incorrectly. Try double checking the API key and restarting logseq
A 429 error means rate limiting, which is an error from openai when you call them to frequently. I'll work on better handling of this error.
In the meantime, double check the API key to fix the 400s, and if you see 429s, wait a couple minutes and try again.
Hi. I'm also seeing the error Refused to set unsafe header "User-Agent"
after not using the plugin for a bit. Just to be sure, I created a new API key and still the got the same 429 from openai. All the plugin configuration settings have default values e.g. text-davinci-002. Perhaps this is related to https://github.com/openai/openai-node/issues/6 ? Thanks for the great plugin
Hmm, I also see the unsafe header error in my console, but I get a 200 success.
Could you take a look at what the response message is for the 429 errors? Does it happen every time and consistently? Or every once in a while?
Based on looking at the openai forums, it sounds like they occasionally throw these errors for low traffic levels.
https://community.openai.com/t/server-always-results-in-429-errors-with-fine-tuned-models/21290
If you're only seeing this occasionally, I could add some retry/buffering to make the error show up to users less often. I think I may need to handle and expect this error, even for infrequent calls.
Error persist.
@cliffordx would you be able to check the error message in the networking tab?
And is it happening on every request or only occasionally?
I have a fix for this here that I'm currently testing. It should help alleviate the 429 errors.
The unsafe user agent message in the logs doesn't cause any issues, so ignore it for now. I'm working on a PR to the openai SDK to fix the user agent message. I updated the readme to reflect it.
If you know how to load unpacked plugins, would be great if you could help test this build!
https://github.com/briansunter/logseq-plugin-gpt3-openai/pull/29
My 429 response contains:
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}
I looked around in the dashboard and it wasn't obvious that my quota was exceeded. Looking at https://beta.openai.com/account/api-keys doesn't indicate anything. On https://beta.openai.com/account/usage, I was able to see that my 3 month trial had ended, not that I had exceeded a quota. Perhaps this issue could just be resolved with some messaging guiding people to check if their trial has expired in addition to checking their quota
My 429 response contains:
{ "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": null } }
I looked around in the dashboard and it wasn't obvious that my quota was exceeded. Looking at https://beta.openai.com/account/api-keys doesn't indicate anything. On https://beta.openai.com/account/usage, I was able to see that my 3 month trial had ended, not that I had exceeded a quota. Perhaps this issue could just be resolved with some messaging guiding people to check if their trial has expired in addition to checking their quota
I can confirmed this response is similar to mine but haven't used GPT for a while.
Great. Thanks for the response payload. I’m working on a change to surface those errors better. #30
New error is helpful. Thanks!
Hi, your get-youtube-captions plug-in has been a great help in getting youtube transcripts into Logseq, thanks so much!
Now attempting to use the gp3 plug-in but can't seem to get it working. First was getting a 429 error, so I upgraded to a subscription with openai.. Any insight for a path forward would be appreciated.