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

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:

主站蜘蛛池模板: 永善县| 临泽县| 阳曲县| 库伦旗| 济阳县| 永胜县| 疏附县| 普陀区| 龙口市| 从江县| 平凉市| 日土县| 丹棱县| 读书| 辽阳县| 阜新| 石柱| 苍南县| 都昌县| 通山县| 淅川县| 海伦市| 定西市| 依兰县| 双鸭山市| 安图县| 梅州市| 文成县| 甘泉县| 新郑市| 通州市| 察哈| 宁陵县| 甘孜县| 平阴县| 武威市| 隆林| 邵阳县| 泰来县| 夹江县| 定襄县|