# OpenAI maximum length

**URL:** https://community.thunkable.com/t/openai-maximum-length/2812174
**Category:** Questions about Thunkable X
**Created:** [January 31, 2024, 6:14am UTC](https://community.thunkable.com/t/openai-maximum-length/2812174 "2024-01-31T06:14:47Z")
**Posts on this page:** 13
**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: [January 31, 2024, 6:14am UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/1 "2024-01-31T06:14:47Z")

</div>

When adding a prompt the response i get is chopped of. I have a feeling that it is the maximum length of the Token / Completion is to low by default. Does anyone know the default value?

Now, checking with chatgpt, prompt coulkd be completed with as string like this to increase the max length - CAN i do that through thunkable blocks somehow ?  
Appreciate a quick reply…i can not just add this text as part of the string…can i ?

```auto
response = openai.Completion.create(
    engine="davinci",
    prompt=prompt,
    max_length=2000
)
...
@tatiang @ioannis Do you know...??

For example is this correct approach? 
![image|550x500](upload://xjF7lkYpVEudVOWi0wOH27XQrQd.png)
```

---

<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: [January 31, 2024, 2:17pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/2 "2024-01-31T14:17:06Z")

</div>

@stefansladdeneng1 Please note that it goes against our [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78) to tag users in your first post, please refrain from doing so in the future.

> [@Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/1):
>
> # Make your posts easy to read and concise.
> 
> Help other Thunkers get the most of your post by being concise, clear and to the point. Please do not use ALL CAPS or excessive emoticons and only include relevant URLs (posts with excessive or unsolicited URLs will be removed).
> 
> If you are using AI to help answer a question, make sure the information from that source is accurate and up-to-date.
> 
> Please do not @mention individual members of the Community when creating a new question.

You might be able to edit the max length by updating the request settings.  
 ![Screenshot 2024-01-31 at 9.13.15 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/77bcd41419d9a54977164060bf75c41331ff1b21.png)

These can be accessed by clicking on the gear icon next to the Open AI component.  
 ![Screenshot 2024-01-31 at 9.16.10 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/68334ed5a9863c3350d9996d07406fa6caa0db15.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: [January 31, 2024, 2:19pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/3 "2024-01-31T14:19:23Z")

</div>

Of course Matt - My appollogies.  
And thank you for your answer…  
Ill try that…

---

<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 7, 2024, 2:32pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/4 "2024-02-07T14:32:30Z")

</div>

I think i need to reopen this one and ask for som techinal and to view in the logs.  
When i am running an OpenAI Prompt through the system it works perfekt on computer screen  
but when i run it through any Phone (Iphone 8 and 13) the system chop of the text some how and the whole response is not visualized in the label as it is ion a computer screen.  
whom on the technical side in Thunkable can help me look into this ?  
Thansk in advance…

PS This May have to do with the Maximum Length talked above. Happy to share my project though with Thunkable for investigation

---

<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 7, 2024, 3:34pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/5 "2024-02-07T15:34:41Z")

</div>

@stefansladdeneng1 Can you please share screenshots of both the app on a device and how it looks in your design editor? It is impossible for anyone to be able to help very much if we cannot see what is going on. Thank you!

---

<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 7, 2024, 3:52pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/6 "2024-02-07T15:52:47Z")

</div>

Here are the screenshots required. The top one is of course from Thunkable live and the lower one is from Computer. Since it is an AI prompt asking the response is a little bit different every time.  
The parsing and structuring after the response works fine so if cant be that. (It woks on computer screen) i also elaborated with adding witing time sithout success  
Something is happening when running on thunk live app

 ![Screenshot 2024-02-07 at 16.45.48](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/29752d90eae9df687c370322589686f0db32245e.jpeg)  
 ![Thunkable 2024-02-07 16-44-27](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e00b4c88ac4424955820a230bda3fb2b559d595f.jpeg)  
 ![Thunkable 2024-02-07 16-53-29](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/2/92396ea6b1f01823c101ac2e7376ee4489ea51ed.jpeg)

---

<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 7, 2024, 4:26pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/7 "2024-02-07T16:26:01Z")

</div>

Are these UI components set within our [Layout](https://docs.thunkable.com/app-design/ui-components/basic-components/layout) component?

How the components render in the Thunkable Live app can be different due to the screen size of the device you are testing with and the Apple-required white space that will condense the viewable area.

---

<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 7, 2024, 5:47pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/8 "2024-02-07T17:47:07Z")

</div>

Hi - It was not - But i put the blue search box inside one as well as the green response box.  
Same result im afraid.

---

<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 7, 2024, 6:07pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/9 "2024-02-07T18:07:18Z")

</div>

While waiting - i push one release through the system to see what happens in testflight. Ill let you know…

---

<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 8, 2024, 11:28am UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/10 "2024-02-08T11:28:04Z")

</div>

The testflight application gives exactly the same…

---

<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 8, 2024, 2:19pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/11 "2024-02-08T14:19:54Z")

</div>

This is expected. How it renders in TestFlight should not be radically different than what you see in the Thunkable Live app.

---

<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 8, 2024, 2:25pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/12 "2024-02-08T14:25:42Z")

</div>

OK Thanks for clarifying this Matt.

---

<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 8, 2024, 2:26pm UTC](https://community.thunkable.com/t/openai-maximum-length/2812174/13 "2024-05-08T14:26:04Z")

</div>

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