How can I show user input on Response section in D

2019-09-02 18:38发布

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.

For example:

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. enter image description here

Currently I get Your age is 100 as I manually added 100 as a value to age parameter. Any idea on this?

1条回答
男人必须洒脱
2楼-- · 2019-09-02 18:51

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: enter image description here Parameter: enter image description here Response: enter image description here

Edit: for getting name(text) input you have to use @sys.any entity (make sure that you are using template mode (@) and not example mode("))

Training phrase & parameter: enter image description here Response: enter image description here

查看更多
登录 后发表回答