Voiceflow PartnersVPVoiceflow Partners
Powered by
Tom  KuhlT
Voiceflow Partners•2y ago•
1 reply
Tom Kuhl

Using conditions with multiple blocks

I prompted GPT4 to build a date range selection function to return weather forecast data for upcoming trips to a destination.

It works by asking for an arrival data and departure date then assigns them a day number from the current date. For example:

Today is 05/14/2024 which is returned as Day0 with a value of 0.

If a traveler gives a arrival date of 05/15/2024 and a departure date of 05/17/2024 the function returns the following:

Day0 = 0
Day1 = 1
Day2 = 1
Day3 = 1
Day4 = 0
Day5 = 0

etc…

With the function working, I setup conditions for all the days:

If Day0 is 1
If Day1 is 1
If Day2 is 1

etc…

Then I set up text blocks to test the flow, expecting the above examples of travels days to hit the blocks for Day1, Day2, and Day3, but as you can see by the screenshot, it only hit Day1 then stopped.

Because the API charges by the call and not by the token, I’ve been calling before the function and pulling all the data. The function is then intended to tell the bot what days to display data for.

Anyone have suggestions on setting up a better flow or know how with the current flow that I can hit multiple text blocks when a value of 1 is returned?
Single_Day_Path.png
Voiceflow Partners banner
Voiceflow PartnersJoin
Exclusive community for Voiceflow Solutions Providers & Content Creators.
13,076Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
jacklyn

# Let your agents search the web 🔎 Hey everyone! We just released the web search tool for the agent step! Your agents can now automatically search the web for information, letting your agent supplement the LLM's knowledge and the data in its knowledge base with live, up-to-date information. Plus.... * You can restrict searches to specific domains, so your agent only searches sites that you own * This is a tool, so you remain in control of when the agent searches the web * Results are automatically summarized in a way that your agent can automatically understand Under the hood, we're using OpenAI's web search API. Give it a try, and let us know what you think! https://docs.voiceflow.com/changelog/native-web-search-tool

jacklyn · 4mo ago

jacklyn

jacklynbiggin's Thread

jacklyn · 4mo ago

hurt-tomato

connor_maclean's Thread

hurt-tomato · 4mo ago

Similar Threads

Iterating through multiple conditions and connecting to multiple blocks
Tom  KuhlTTom Kuhl / ❓┃ask-a-question
2y ago
Triggering Multiple Exit Conditions
SaadatSSaadat / ❓┃ask-a-question
2mo ago
Iterating through multiple blocks - Part 2
Tom  KuhlTTom Kuhl / ❓┃ask-a-question
2y ago
Using multiple Knowledgebases
M1lkyW4yMM1lkyW4y / ❓┃ask-a-question
6mo ago