[Solved] Why chatgpt API doesn't work, error response : undefined

here is the code, error response: undefined

why and any code sample or debugging thoughts.

Hi there @bfcq10282o3, thanks for reaching out.

Please see this below previous thread but the issue is likely that you do not have any credits to use toward the model.

Be sure to also set your repsonse to a text label as well.
Screenshot 2023-08-10 at 11.48.45 AM

I also want to point out, in case anyone else runs into this vague “undefined” error, you can check the console in your browser to get more specifics. In this case, when I used the Web Preview for the app in x.thunkable.com, the console showed a 429 error with my query.

A quick google search for “429 error openai” shows that this means the rate limit for my key has been exceeded. In short, I need more credits.



yes, I solved by a couple of wait and referesh,thx a lot