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

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.

主站蜘蛛池模板: 砚山县| 宁陕县| 化德县| 南木林县| 山阳县| 怀集县| 南乐县| 望奎县| 纳雍县| 通河县| 息烽县| 三门峡市| 安陆市| 澎湖县| 筠连县| 克山县| 纳雍县| 建湖县| 岳阳县| 长阳| 盐山县| 夏津县| 中山市| 晋宁县| 兴隆县| 克拉玛依市| 定边县| 三都| 东丽区| 九龙城区| 横峰县| 自贡市| 光泽县| 武义县| 新晃| 越西县| 濮阳市| 桐城市| 台中市| 安阳县| 龙里县|