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?
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
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?