Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
977 views
in Technique[技术] by (71.8m points)

if statement - Dialogflow: Respond based on values and other conditional responses

I have $dinetype variable obtained from the user.

enter image description here

But I would like to give response based on what value has been set in $dinetype variable. In addition to giving responses, I also need to set relevant context. How do I do this in DialogFlow?

enter image description here

if($Dinetype=='dineout') 
      ask ('which restaurant would you like to go to?')
      set_context ('awaiting-restaurant')
if($Dinetype=='takeaway') 
      ask ('When would you like to take away?')
      set_context ('awaiting-takeaway-time')

Is it programmable at all? Or is it possible to achieve something equivalent to the above in the UI?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...