官术网_书友最值得收藏!

Creating the dialog for a complex Intent using Frame Slots

Now let's examine a slightly more complex case. In the Try it out panel, enter Transfer money to my mother's savings account. You should see it come back with something like this:

In this case, Watson has recognized the intent to transfer money to my mother's account. Again, we can imagine the application resolving who my mother is by looking up my account relationship information—perhaps that is an account that I had previously identified as a linked account. However, as straightforward as this little interaction seems, it might be somewhat unsatisfying for the end user. After all, how much does the user want to transfer, and from what account should the transfer be made?

To make this more complete, we need to do a bit more work.

In this case, we're going to create what we call a frame-slot dialog. That is, a dialog whose goal is to fill in all the information needed to complete the transaction. We'll use the #Funds-Transfer intent to demonstrate this. Transferring money between accounts depends on three things: the amount to transfer, where to take it from, and where to put it. We'll show you how to add this additional level of sophistication now.

We will begin adding another node to the dialog. Press the Add node button on the Dialog pane:

In the edit window, you can set this node to look for #Fund-Transfer, and then press the Customize button:

Pressing Customize will bring up a dialog box, where you can turn on and apply slot-processing for this node: 

This will open the dialog node to a set of slots, and we can begin by creating a slot for gathering the from account information. Fill in @Accounts in the Check for field, $FromAccount in the Save it as field, and What account do you want to debit? in the If not present, ask field:

主站蜘蛛池模板: 开江县| 禹城市| 清流县| 黑山县| 砚山县| 梅河口市| 磐安县| 梁山县| 柘荣县| 涡阳县| 洛阳市| 叙永县| 正蓝旗| 乐安县| 黄山市| 中江县| 石嘴山市| 兴安县| 九江县| 神农架林区| 吉安市| 锦屏县| 汨罗市| 周宁县| 齐河县| 子长县| 佛学| 桂东县| 鄂伦春自治旗| 汾阳市| 双桥区| 陇西县| 桑植县| 莱阳市| 博野县| 广元市| 民勤县| 彭水| 余江县| 南岸区| 融水|