简体   繁体   English

是否可以在Lambda ASK代码中向自定义插槽类型添加值?

[英]Is it possible to add values to a custom slot type in Lambda ASK code?

I am making a custom slot type that will be different for each skill user based on a certain list of their products. 我正在制作一个自定义插槽类型,该类型对于每个技能用户都将基于其产品的特定列表而有所不同。 Is there a way to define an empty slot called "userProducts" and then populate it in my NodeJS code with Alexa Skills kit? 有没有一种方法可以定义一个名为“ userProducts”的空插槽,然后使用Alexa Skills套件将其填充到我的NodeJS代码中?

I've been looking for the same thing, but unfortunately there isn't a way to update the list of slot values at runtime. 我一直在寻找相同的东西,但是不幸的是,没有一种在运行时更新插槽值列表的方法。 However, the values that Alexa will fill a slot with aren't limited to the sample values that you've entered so you could try to match the given value to your list at runtime and keep asking the user what they want until you get an acceptable value. 但是,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 在JSON和文本中定义交互模型

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有什么方法可以在Alexa Lambda函数中创建自定义插槽值? - Any way to create custom slot values in Alexa Lambda function? Alexa自定义意图接受未存储在可能的插槽中的值。应该触发它的值 - Alexa custom intent accepts values which are not stored in the possible slot.values that should trigger it 为什么我的代码没有在 Alexa 开发控制台模拟器上运行 if 语句,即使我说出/输入我的插槽中存在的值? - Why is my code not running the if statement on the Alexa Development Console simulator, even if I utter/type the values that are present in my slot? 可以向jquery.min.js添加一些自定义javascript代码吗? - Is possible to add some custom javascript code to jquery.min.js? 是否有可能在特定时间点停止执行代码并要求确认然后继续进行? - Is it possible to stop execution of code behind at certain point and ask for confirmation and then proceed? 如何将PHP或Javascript代码添加到自定义内容类型 - How to add PHP or Javascript code to a custom content type Alexa Ask-CLI如何添加自定义https服务器 - Alexa ask-cli how to add a custom https server 将类别添加到广告位范围 - Add class to slot scope 是否可以在每个Ajax请求中执行自定义代码,而无需将代码手动添加到Ext Js中的每个ajax代码中? - Is it possible to execute custom code in every Ajax request without having manually add that code to every ajax code in Ext Js? 可以将空插槽推入阵列吗? - Possible to push empty slot to an array?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM