CaioEliasC
Voiceflow6mo ago
1 reply
CaioElias

agent block response

I have a function that splits a paragraph into shorter sentences. When I used prompt blocks, I could easily use this function because I was able to store the prompt's response in a variable. However, I’m having trouble doing the same with an Agent block response.
How can I store the Agent block's response in a variable or make the Agent reply in shorter, separated sentences instead of one long paragraph?
I’ll be using this on WhatsApp, so shorter messages are better than large blocks of text.

How can I make the function called inside the Agent block receive as input the message the AI is about to send to the user?
I want this function to break the message into a maximum of 5 shorter sentences. Also, how can I configure the Agent to send each of these sentences as separate replies to the user (for example, on WhatsApp), instead of sending one long message?
Was this page helpful?