Doing a dining IVR booking system on Twilio.
Currently asking the question to the user:
"Are you bringing any guests and if so how many?
I know I can get there if I do 2 individual questions using the SpeechResult on the split:
"Are you bringing any guests?"
Split - "Yes" or "No"
"How many guests are you bringing?"
Split - "1", "2", "3", "4" or "5".
But I want to find out is it possible to do this as a singular question with the likes of a nested split? I.E
1st Split - "Yes" or "No"
2nd Split - "1", "2", "3", "4" or "5".
Answer I found how to do this is as so:
Set the split to contains following by the answer selection you want. Its a bit crude but its the way I found that works.
In my case I put my split for the following conditions:
Contains Yes 1, Contains Yes 2, Contains Yes 3, Contains Yes 4, Contains Yes 5, Contains No.
And in the fetch statement I have the following prompt which is sent to OpenAI.
This worked so far, however I do get some occasional bugs from ChatGPT so I have to continue refining the prompt but it delivers the point across.
But in short this allows me to grab multiple inputs from the same message.