# \[Solved\] OpenAI Undefined as response - But not a credit error

**URL:** https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256
**Category:** Questions about Thunkable X
**Created:** [February 6, 2024, 9:15am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256 "2024-02-06T09:15:30Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 9:15am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/1 "2024-02-06T09:15:30Z")

</div>

Hello all,  
I have got this “undefined” as a response to [openai.com](http://openai.com) API calls. Used to work perfectly.  
Checking the console - you can see the errors i have got but they are really like chineese to me. Anyone having an idea…?  
Thanks in advance,

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/0/80c8d7c9fd2be96246cc965bdc57de98db483b67.png)

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [February 6, 2024, 11:40am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/2 "2024-02-06T11:40:46Z")

</div>

Hello,  
Could you please check this? [OpenAI ChatGPT API KEY not working - #11 by ioannis](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/11)

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 11:46am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/3 "2024-02-06T11:46:01Z")

</div>

As far as i can see i have still creds and i can use the Playground without disturances…

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 11:46am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/4 "2024-02-06T11:46:34Z")

</div>

What happens in your network traffic tab? Do you see the call go out to openAI?

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 11:49am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/5 "2024-02-06T11:49:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/2/324f8e8c091629aa6846e8e240f5e73587220005.png)  
All green as i see it…

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 11:50am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/6 "2024-02-06T11:50:19Z")

</div>

What’s that 25 second call? “Poll”

nvm.

on my side, when i make a completion call, for example, i see sometihng like this

 ![Screenshot 2024-02-06 at 6.55.07 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a0fd3868560dec41dd6da47f4ab028790def09f.png)

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 11:55am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/7 "2024-02-06T11:55:40Z")

</div>

No idea - Did another run. Does it say anthing to you ?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f94942475545b7a62962ae18b5028d70c493bf0.png)

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 11:55am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/8 "2024-02-06T11:55:55Z")

</div>

nada. looks like there’s no traffic to openAI.

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 11:58am UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/9 "2024-02-06T11:58:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/c/0c6a505592d116225d1356b0aaa5b852901c1325.png)

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 12:00pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/10 "2024-02-06T12:00:26Z")

</div>

I agree to that - but it used to work and i tried alot. it all started when the vesion of chatgpt was depreciated and changed to something else.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 12:27pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/11 "2024-02-06T12:27:31Z")

</div>

For my test, I simply created a key and used the blocks as normal. Nothing special.

Have you tried this on a test page with only an open ai call?

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 12:37pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/12 "2024-02-06T12:37:42Z")

</div>

Hmmmm…  
I just discovered asmall error - all made by my self… 😃  
Sorry to bother your time with this. having said this - and very much related is thet i am trying to get a reply (which i do now) but the text is Chopped off when i do the prompt from an Iphone - But NOT when using the Thunkable Live tester

it is also when i try to laborate with the Token “Maximum Length” i do get “undefined” as a reply

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 3:02pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/13 "2024-02-06T15:02:32Z")

</div>

when you say chopped off, i’d say ‘why do you think it’s chopped off’

i’d guess your label isnt growing to accommodate all the text.

how are you passing the token maximum length?

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 6, 2024, 6:43pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/14 "2024-02-06T18:43:06Z")

</div>

The problem is that it does word when irun it on computer screen. But not on phones.  
Everything is the same….

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 6, 2024, 9:36pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/15 "2024-02-06T21:36:38Z")

</div>

strange.

happy to test it out on my end

try this  
[https://x.thunkable.com/copy/08053b19d3258f4490c5ac989c4afc3a](https://x.thunkable.com/copy/08053b19d3258f4490c5ac989c4afc3a)

i threw my own code in there.

only thing i could imagine is that you need to replace the blocks because the code was updated on the backend and broke stuff

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [February 26, 2024, 6:48pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/16 "2024-02-26T18:48:31Z")

</div>

Dear all  
I found the error regarding ”text chopped off”  
I did elaborate with the ”max length” of the label to display a massive text block.  
In my case iincreased it to 6500 which allowed all text to be shown without any problem.

This case can be closed with solution

---

<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 26, 2024, 6:53pm UTC](https://community.thunkable.com/t/solved-openai-undefined-as-response-but-not-a-credit-error/2822256/17 "2024-02-26T18:53:40Z")

</div>


