Closed Codedrummer closed 10 months ago
send me the console log error screenshoot, here or on discord, whichever is more convenient for you.
edit. also it would be helpful to know which version of the module are you using
Seeing the same issue on Foundry v. 11.313 and module v. 1.5.4:
Access to fetch at 'https://api.openai.com/v1/chat/completions' from origin 'https://redacted' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
POST https://api.openai.com/v1/chat/completions net::ERR_FAILED 503 (Service Unavailable)
TypeError: Failed to fetch
at npcGenGPTLib.callAI (lib.js:28:36)
at npcGenGPTGenerateNPC.initGeneration (generateNPC.js:61:49)
at HTMLButtonElement.dispatch (jquery.min.js:2:43184)
at y.handle (jquery.min.js:2:41168)
Seeing the same issue on Foundry v. 11.313 and module v. 1.5.4:
@jcomplex, did the issue occur only once, or does it happen every time the module is used? are you on the forge?
I am getting the same issue here is my error log. it is happening everytime I try to generate
NPC Generator (GPT) | Sending Request api.openai.com/v1/chat/completions:1 Failed to load resource: the server responded with a status of 500 () foundry.js:68326 NPC Generator (GPT) | Request Denied! Wait a few seconds and try again. (See console (F12) for more details) fetch @ foundry.js:68326 lib.js:40 Error: 500 | Message: Internal server error at npcGenGPTLib.callAI (lib.js:34:23) at async npcGenGPTGenerateNPC.initGeneration (generateNPC.js:61:30)
It's a OpenAI issue. The API status page reports:
Elevated Errors on API and ChatGPT Identified - The issue has been identified and a fix is being implemented. Investigating - We're experiencing an elevated level of API errors and are currently looking into the issue.
I'm not sure their reported issue is what's causing these denies. May be another that they're unaware of, but I'm still experiencing the issue and they reported a fix on 11/23.
hey @chrisnciss, can you please send me a screenshot of the console error regarding the issue that you're experiencing?
I am having this same issue, it seems to be code 429 error is what I think I need to resolve, (See Screen Shot)
I'm no expert, so I'm just spamming my thoughts.
@Ruinwolf as you can see from the error it reports that you have no credit on your openAI account, that's why it refuses your call. Note, as I mention in the readme file, that OpenAI APIs are not free to use although they are really cheap.
I'm gonna edit the readme so this will be more clear since many people are not aware of it, my bad taking it for granted and apologies for the inconvenience.
Bug Description
I've followed the directions, installed the module, copied the API key and pasted it within the settings for the module, but I keep getting the request denied message
Steps To Reproduce
Install module Generate API key Paste API key in module settings Go to character tab Click create NPC Generate
Foundry Version
Foundry 11.315
Additional Information
No response