简体   繁体   English

api.ai中的问题范围

[英]scope of questions in api.ai

Can anyone suggest me , how to allowed scope of questions in api.ai ? 谁能建议我,如何在api.ai中允许问题的范围? ie I want to ask user "how many book can you carry at a time ?" 即我想问用户“您一次可以携带多少本书?” : user can reply any positive integer number. :用户可以回复任何正整数。 Then my bot reply: "good , you can still better than others!". 然后我的机器人回答:“好,您仍然可以比别人更好!”。 now, without any reference if user directly write "any positive integer number" at starting then also bot reply : "good , you can still better than others!" 现在,如果没有任何参考,如果用户在开始时直接写“任何正整数”,那么机器人还会回答:“好,您仍然可以比别人更好!” , instead of "I didn't get"(or default response.). ,而不是“我没收到”(或默认响应)。 This answer come only when previous question has been asked.How can I do this? 仅当提出上一个问题时才会给出此答案。我该怎么办?

==== case : 1 ==== ====案例:1 ====
Bot: how many book can you carry at a time ? Bot:您一次可以携带几本书?
User:5 用户:5
Bot:good , you can still better than others! Bot:好,您仍然可以比别人更好!

=== case : 2 === ===案例:2 ===
(without any reference if users gives inputs at very starting of conversation) (如果用户在会话开始时就提供了输入,则没有任何参考)
User: 5 用户:5
Bot: good , you can still better than others! Bot:好,您仍然可以比别人更好!

Thanks In Advance. 提前致谢。

You should make a required parameter instead of putting numbers in User says : 您应该输入必需的参数,而不要在“ User says数字:

In your intent configure your action to have one required parameter numBooks . 根据您的意图,将操作配置为具有一个必需的参数numBooks Have the prompt for that parameter be "how many book can you carry at a time ?". 该参数的提示是否为“您一次可以携带几本书?”。 Then for that intent, have the response be, "good , you can still better than others!". 然后出于这个目的,做出的回应是:“好,您仍然可以比别人更好!”。 Finally, in the User says section, add anything you want the user to say to trigger the intent, for example: "hi". 最后,在“ User says部分中,添加您希望用户说来触发意图的任何内容,例如:“ hi”。 Save your intent. 保存您的意图。 Now whenever a user says "hi" the bot will ask the question and the conversation will begin. 现在,只要用户说“嗨”,机器人就会问这个问题,对话就会开始。 But if the user randomly sends a number, it will respond with fallback intent. 但是,如果用户随机发送一个数字,它将以回退意图进行响应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM