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

No context

In the previous section, we used the context from the external intent Get Name to get the data needed for the Get President Birthday intent. What if you do not always want to use the context, but simply want to ask the user for the missing data?

  1. In the User says section, add  I want to know @president-birthday:president-birthday. Notice that the president-birthday parameter in the Action section is automatically added.
  2. Have a REQUIRED checkbox checked for president-birthday.
  3. Click on the Define prompts link that appears in the PROMPTS column.
  4. Enter the prompt that asks, Which president's birthday would you like to know?.

The following screenshot shows steps 2 to 4 with the required parameter, president-birthday:

No context

The following screenshot shows the default prompt if the required parameter, president name, is not given:

                                                                       Default prompt for the required parameter

When the user asks what is his birthday?, the Get President Birthday intent will get triggered, but since no president-birthday entity is captured from the user's request, the intent will prompt the user with Which president's birthday would you like to know? As soon as the user gives the answer, the intent will provide a response.

主站蜘蛛池模板: 红桥区| 电白县| 含山县| 周宁县| 新邵县| 桐城市| 霍林郭勒市| 屏南县| 铜梁县| 三明市| 无棣县| 霍州市| 佛冈县| 鄂托克前旗| 略阳县| 眉山市| 洱源县| 姜堰市| 眉山市| 交城县| 鹰潭市| 阿坝县| 锦屏县| 怀来县| 金乡县| 鄂托克前旗| 韶山市| 苏尼特右旗| 常州市| 肥西县| 北安市| 惠东县| 津市市| 蒙阴县| 灵山县| 无棣县| 杭锦后旗| 革吉县| 重庆市| 博白县| 肥西县|