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

Building a dialog

To make your application a little more interesting, you can preface the interaction with a little greeting, and some sort of acknowledgement. We'll do that now.

You can introduce a dialog by pressing the Dialog tab of the main workspace screen and press the Create button. This will begin with a very basic dialog flow already filled out for you—including what to say to get things going, and how to respond in the case the user utters something completely off-topic:

Press on the Welcome card and an edit screen will come up on the right. You can modify the text that Watson will respond with, for example, change it to Welcome to ABC Bank. What can I do for you?:

Now, let's provide an interesting response if the user wants to pay their power bill. Press the Add node button, and in the If bot recognizes: field enter #Pay-Bills, press the + sign to the right of that, and enter @BillingInstitution:(Phone Company) in the field that opens up. There are auto-complete prompts for each of these steps that will help you fill in the values. Finally, enter Thank-you, we will pay your Power Bill in the Then respond with: field:

Now, let's try it out. You should see the following:

Of course, what you're seeing in the preceding Try it out screen is a prototype application that is exercising the dialog you just created along with the intents and entities that you've trained Watson to recognize. In your own application, you will be able to build the user interface to suit whatever is appropriate for your audience. 

主站蜘蛛池模板: 建德市| 贵州省| 漳浦县| 迭部县| 石泉县| 汉川市| 广元市| 苍梧县| 秭归县| 新巴尔虎左旗| 资溪县| 奉贤区| 通海县| 南安市| 镇安县| 陇西县| 大足县| 赞皇县| 正阳县| 壶关县| 土默特左旗| 呼和浩特市| 云和县| 莱西市| 蕉岭县| 华阴市| 惠安县| 颍上县| 揭西县| 万安县| 长阳| 滦南县| 通江县| 镇远县| 岗巴县| 盐边县| 浠水县| 武平县| 静海县| 巨鹿县| 洛扎县|