我正在制作一个自定义插槽类型,该类型根据每个技能用户的特定产品列表而有所不同。有没有办法定义一个名为“userProducts”的空槽,然后使用 Alexa Skills 套件将其填充到我的 NodeJS 代码中?
最佳答案
我一直在寻找同样的东西,但不幸的是没有办法在运行时更新槽值列表。但是,Alexa 将填充槽的值并不限于您输入的示例值,因此您可以尝试在运行时将给定值与您的列表进行匹配,并不断询问用户他们想要什么,直到您得到一个可接受的值。
Note that a custom slot type is not the equivalent of an enumeration. Values outside the list are still returned if recognized by the spoken language understanding system. Although input to a custom slot type is weighted towards the values in the list, it is not constrained to just the items on the list. Define the Interaction Model in JSON and Text
关于javascript - 是否可以在 Lambda ASK 代码中向自定义槽类型添加值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44850549/