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.
https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests