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

Hi super supportive group, :slight_smile:
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:



Thanks so much for your help.

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

1 Like

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.

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.

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?

Not until I see the actual response from chatGPT

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.

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.