Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

DialogFlow ES play singular vs. plural

I'm newish to DF and integrating it with Cisco IVR, so trying not to use webhooks if possible. I want caller to say something like "buy a ticket from boston to miami" vs. "buy 3 coach tickets" and I'm using required parameters for qty, fromcity, tocity, seat_class.

In the Response I'd like to play it back as 'looking up $qty (ticket|tickets) from $fromcity to $tocity in $seat_class class.

Is there a way to do the singular vs. plural of the word 'ticket' by creating a custom entity or something?

I tried to create an entity numTickets to capture 'a ticket' vs. '@sys.number-integer tickets' but can't figure out what to put into the entity's 'reference value' field to get the actual number of tickets to be returned. I tried returning @sys.number-integer but that's literally what I got back, rather than the value of that.

Thanks

question from:https://stackoverflow.com/questions/65852379/dialogflow-es-play-singular-vs-plural

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

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...