Adding Slots to an Intent

The Star Port 75 Travel skill needs to be able to book trips for spacefaring adventurers based on three parameters: the destination, the departure date, and the return date. To enable this, we’ll add a new intent to the skill that accepts those parameters in slots. But first, let’s start by writing a BST test specification that captures and asserts what we want the intent to do:

 ---
 configuration:
  locales: ​en-US
 
 ---
 - test: ​Schedule a trip
 - ​"​​Schedule​ ​a​ ​trip​ ​to​ ​Mercury​ ​leaving​ ​Friday​ ​and​ ​returning​ ​next​ ​Thursday"​:
  - prompt: ​I've got you down for a trip to Mercury,
 leaving on Friday and returning next Thursday.
 
 --- ...

Get Build Talking Apps for Alexa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.