How do you place words of string into list?

Hey there, I am trying to send the Chatbot text response into a list with each word from the response separated. I want to then iterate through the list to find a keyword such as "temperature" so that I can then perform an action within my app based on receiving that keyword. So far I've gotten the chat bot to spell "Apple" and "Choir" and searched for "A" and "C" and it works for individual letters. But I want entire keywords or phrases to best prevent the chance of false positives. Thanks

image

not sure what you're trying to suggest. Ive done this and nothing changes. I realize the screenshot shows a version of the code without the "split text at" function, my mistake. But ive tried all of that

Show an example response (as text) from the chatbot. This may help us to help you...

i ran out of my $5 open ai tokens, ill have to return to this sub at a later date maybe next week. The chat bot displays a perfect sentence in a text box within the app. But when i try to break up the sentence into words at the spaces, it actually breaks up the entire response string into individual letters

The blank you are using in your split block is not actually a blank. It is an empty text.

Go back into the text block and squeeze a space into it. Wiggle the cursor around in it to verify there is actually a blank in there.

This is a side effect of AI2's unfortunate tendency to trim text in text blocks.

this worked perfectly thank you! but now i have another question: The keyword im searching for in my list is "temperature", however, I want my code to only care about "cooler temperature" and not temperature of a hotdog for example. so I've tried writing "Cooler Temperature" into my "is in list? thing" block but the code "fails" (by not recognizing the two words from the response) and just gives me a generic chatbot response. How can i fix this?

It's hard to guess what went wrong without seeing the list contents.

Downshifting everything before splitting and comparison would rule out differences between cooler and Cooler.

If you know ahead of time that you want to search for "cooler temperature", check the text before splitting it, using a text Contains block.

Once the text is split, multi-word consecutive word checking would depend on relative indices in the list or your words, like

is (index in list of "temperature") - (index in list of "cooler") = 1 ?

Try to think ahead of all the lookups you will need, to establish a common pattern you can code.

and be careful with these things (case sensitive)

i need to admit that went over my head. programming and the logic does not work for my brain, do you mind sharing a visual representation (literally no rush)

Here's some study material for you.