如何在Dialogflow的“响应”部分显示用户输入 [英] How can I show user input on Response section in Dialogflow
问题描述
我想在响应部分上打印出用户输入,但是由于某些原因,我似乎找不到如何执行此操作。
I would like to print out user input on a Response Section but for some reason I cannot seem to find how can I do this.
例如:
Bot: How old are you?
User: 40
Bot: Your age is 40.
我也是附上我有参数的屏幕截图,但我不知道该如何确定年龄。
I am also attaching a screenshot where I have a parameter but I just dont know to what to assing age.
当前,我将您的年龄设为100,因为我手动将100作为年龄参数的值添加了。对此有任何想法吗?
Currently I get Your age is 100 as I manually added 100 as a value to age parameter. Any idea on this?
推荐答案
要获得用户的输入,您必须在实体中捕获该年龄值。您可以使用系统实体,也可以创建自己的实体,但是对于您的情况来说,捕获年龄 sys.number-integer 可能是完美的!
To get the input from user you have to capture that age value in an entity. You can either use a system entity or create your own, but for your case to capture "age" sys.number-integer can be perfect!
只需在意图中添加一个训练短语作为模板短语(请参见左侧的 @ ),只需点击该训练短语旁边的默认 符号即可切换到模板模式,因为它最适合您匹配年龄的需求。
Just add a training phrase in the intent as template phrase (see that "@" at the left), just click on the default " symbol beside the training phrase to switch to template mode as it will suit best for your need of matching age.
培训短语:
参数:
响应:
Training phrase: Parameter: Response:
编辑:要获取名称(文本)输入,您必须使用@ sys.any实体(请确保您使用的是模板模式(@),而不是示例模式())
for getting name(text) input you have to use @sys.any entity (make sure that you are using template mode (@) and not example mode("))
这篇关于如何在Dialogflow的“响应”部分显示用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!