# Need help with using "split by" of a ChatGpt Call

**URL:** <https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888>\
**Category:** Need help\
**Created:** [February 10, 2024, 4:51pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888 "2024-02-10T16:51:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisustar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lisustar/32/186017_2.png) [@lisustar](https://forum.bubble.io/u/lisustar)\
**Post date:** [February 10, 2024, 4:51pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/1 "2024-02-10T16:51:38Z")

</div>

Hi super supportive group, 🙂  
I need some help with “split by”.  
I have a chatgpt call which gives a text back. I want the full text devided into smaller texts. Therefore I’ve included in the custom state the split by option, so the text is splitted after each line break. My idea was to get a list of 5 entries which I can reference in 5 different textboxes. But even though the custom state is a list, it doesn’t work. Does anyone of you has a idea what I’ve done wrong?

custom state:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/0/8/085ba6051b513e2ea76f13ed1ca3abb789182562.jpeg)

workflow:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/3/d33ca176b256f19a10708ade72d9c692cb1297a8.png)

textbox:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/c/ecb29590d312139e66997b9ee02b6bc3a518aead.jpeg)

Thanks so much for your help.

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [February 10, 2024, 5:36pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/2 "2024-02-10T17:36:31Z")

</div>

It is hard to tell without seeing the actual response from chatGPT, so I will say, based on the screen shots, that what is wrong is that the response from chatGPT might not have the items separated by a line break with the `\\n`

---

<div class="post-metadata">

**Author:** ![lisustar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lisustar/32/186017_2.png) [@lisustar](https://forum.bubble.io/u/lisustar)\
**Post date:** [February 10, 2024, 11:18pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/3 "2024-02-10T23:18:52Z")

</div>

Thanks for your quick reply.  
I have now included in the API call that a “;” should be set after each section. This is also generated with the semicolon, but the items are still not recognised individually in the text box.

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [February 11, 2024, 5:27am UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/4 "2024-02-11T05:27:11Z")

</div>

What is the actual response from the API call without attempting to put it into a custom state or using an RG to split it? Just display it in a text element to see how it looks. Could be the same issue with semicolon, that despite your prompt asking for it, the response still might not include it.

---

<div class="post-metadata">

**Author:** ![lisustar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lisustar/32/186017_2.png) [@lisustar](https://forum.bubble.io/u/lisustar)\
**Post date:** [February 11, 2024, 11:23am UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/5 "2024-02-11T11:23:29Z")

</div>

You are right. It showed the line break as well as the semicolon in the Playground, but it doesn’t appear in the text element. Do you have an idea, how to solve that?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [February 11, 2024, 11:51am UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/6 "2024-02-11T11:51:28Z")

</div>

Not until I see the actual response from chatGPT

---

<div class="post-metadata">

**Author:** ![lisustar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lisustar/32/186017_2.png) [@lisustar](https://forum.bubble.io/u/lisustar)\
**Post date:** [February 11, 2024, 2:20pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/7 "2024-02-11T14:20:44Z")

</div>

It does show now the semicolon, but it seems it doesn’t assign them to the items and therefore doesn’t allocate them to the individual groups.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/7/971ca03dbe79cc4bfdf1737781a6ef55001f16a8.jpeg)

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [February 11, 2024, 4:54pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/8 "2024-02-11T16:54:05Z")

</div>

if you use the split by ; then you should be ending up with 5 different value sets but might not be in the way you are looking for.

If this result was split by ; then you’d have everything from 1.Gebratene Champignons: all the way down to the last word in step 4. of servieren.

That would be the first entry in the list -

so this should work to split the five recipes into 5 separate items in a list.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 20, 2024, 4:52pm UTC](https://forum.bubble.io/t/need-help-with-using-split-by-of-a-chatgpt-call/306888/9 "2024-04-20T16:52:28Z")

</div>

Closed on April 20, 2024, 4:52pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
