What's wrong with my Custom State Value?

I’m creating a calorie counting calculator.

I have an input, Enter btn & Text element (for Answer/AI response).

I want the User to send their Input message by clicking Enter, which makes the answer show up in the text element. However, at the moment it just shows the user message again.

The Plug-In part is fine since the answer is there when I reinitialise. I feel like my custom state Value is correct too…idk.

Q: How can I get the text element to update and show the Users answer which they sent in the Input?

P.S. If I add a “Pause before next action” is still shows the Input message, meaning it’s not a time delay issue, nor is it a plug-in or design issue. Must be something wrong with the Value :thinking:

The problem is the Value is not picking up the AI ones. It’s only picking up the messages.

Did you try Open AI - List Message's data:first item's content:second item's text or Open AI - List Message's data:second item's content:first item's text? It might be in another list element. Even try printing all to see if there are any other elements in there.

Yeah I played around with first item, second item and even random item… same thing unfortunately. It’s weird because I can’t find a way to lock onto the AI responses even though it’s apart of the List Messages since I see it if I reinitialise.

We’ve made progress. I found a way to get the AI response to pop up, but it’s not from the one I just submitted in the Input.

So we’ve established I can in fact extract the AI response and now I just need to figure out how to make it relevant to the Input I just submitted.

Changing the text value to first or last doesn’t seem to affect anything. So I’m guessing that’s because there’s only 1 text value (once content is specified).

Having it as last item’s content makes the AI response show up.

Still experimenting but almost there…

So having it as OpenAI List Message’s data: first item’s content… is how I get the one that I just submitted via the Input. Changing the text’s value to first or last does nothing since there’s only 1 I suppose.

It’s strange. If I make it last item’s content then it’ll show the AI response - which is good. But when I make it first item’s content, it only shows the Input message I just sent.

THIS must mean the AI response is not being registered in time for it to be chosen as first item’s content.

P.S. I gtg to work but I’ll revisit tomorrow morning

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