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

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.

主站蜘蛛池模板: 公主岭市| 英吉沙县| 合作市| 贡嘎县| 唐山市| 汉源县| 闵行区| 西充县| 闽清县| 丁青县| 二连浩特市| 庄河市| 永靖县| 漳州市| 深州市| 全州县| 龙胜| 进贤县| 岫岩| 南宁市| 永昌县| 宽甸| 兴山县| 天柱县| 五家渠市| 长治市| 临城县| 房产| 灵武市| 个旧市| 宜君县| 富民县| 清远市| 江陵县| 尼勒克县| 深泽县| 嵩明县| 修武县| 秦皇岛市| 花莲市| 荆门市|