# Open ai chat undefined error what i should do

**URL:** <https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417>\
**Category:** Questions about Thunkable X\
**Created:** [February 1, 2024, 10:46am UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417 "2024-02-01T10:46:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erasylbajgali02wx30h](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@erasylbajgali02wx30h](https://community.thunkable.com/u/erasylbajgali02wx30h)\
**Post date:** [February 1, 2024, 10:46am UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417/1 "2024-02-01T10:46:33Z")

</div>

I tried to make app with open ai where you can ask a question and chat gpt will answer, did everything according to the tutorial, tried it in a variety of ways, and I always got the undefined error  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/e/be7e0d508464d06a50b15315797ca3ce03440e39.png)

---

<div class="post-metadata">

**Author:** ![emlee703](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/emlee703/32/165400_2.png) [@emlee703](https://community.thunkable.com/u/emlee703)\
**Post date:** [February 1, 2024, 12:20pm UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417/2 "2024-02-01T12:20:13Z")

</div>

Welcome to Thunkable!!

See this?: [[Solved] Current OpenAI integration is legacy and is being deprecated by OpenAI](https://community.thunkable.com/t/solved-current-openai-integration-is-legacy-and-is-being-deprecated-by-openai/2769457)

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [February 1, 2024, 2:43pm UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417/3 "2024-02-01T14:43:35Z")

</div>

Hi @erasylbajgali02wx30h, welcome to Thunkable! 🎉

Be sure to check out our posts about [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1) and our [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8) as you get started.

The answer when receiving an undefined error like this is to check your console for a more specific error. Have you added a credit balance to your Open AI account yet? Please see the thread below on how to do this.

> [@ChatGPT request returning undefined](https://community.thunkable.com/t/chatgpt-request-returning-undefined/2780134/2):
>
> Hi @bschwartz25ev, welcome to Thunkable! tada Be sure to check out our posts about [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1) and our [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8) as you get started. The real reason for this error likely lives in your console. You’ll probably see a 4-- error from [https://api.openai.com/v1/chat/completions](https://api.openai.com/v1/chat/completions). Let us know what you see. You can find info on how to access your browser’s console [here](https://balsamiq.com/support/faqs/browserconsole/#:~:text=To%20open%20the%20developer%20console,(on%20Windows%2FLinux).).

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [February 1, 2024, 2:44pm UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417/4 "2024-02-01T14:44:49Z")

</div>

@emlee703 That issue has been fixed and so it’s likely not the issue here. Usually with an undefined error, it is because the user does not have a credit balance on their account but we need to check the console to see the specific error.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [May 1, 2024, 2:44pm UTC](https://community.thunkable.com/t/open-ai-chat-undefined-error-what-i-should-do/2814417/5 "2024-05-01T14:44:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
