简体   繁体   English

有什么方法可以在Alexa Lambda函数中创建自定义插槽值?

[英]Any way to create custom slot values in Alexa Lambda function?

I am currently making a skill which has a custom slot type called "products", but this skill will be used by many different sellers that will have different products, so I cannot know ahead of time which values will populate this slot. 我目前正在使用一种名为“产品”的自定义广告位类型的技能,但是该技能将由拥有不同产品的许多不同卖家使用,因此我无法提前知道哪个值会填充此广告位。 If I define an empty slot type called "products", is there a way to fill the slot type with values IN the Lambda NodeJS code? 如果我定义了一个空的插槽类型“ products”,是否可以用Lambda NodeJS代码中的值填充插槽类型? All I would need to do is make a HTTP request to that specific person's database. 我需要做的就是向该特定人员的数据库发出HTTP请求。

Or possibly could there be a way to define a pseudo-slot in the lambda code with words that Alexa will associate with a slot type? 还是可能有一种方法可以在Lambda代码中用Alexa将与插槽类型相关联的单词定义伪插槽?

I think the slot must be defined in the Intent Schema, and you would have to provide the list of possible names of products for that slot. 我认为该插槽must在Intent Schema中定义,并且您必须提供该插槽可能的产品名称列表。 Possible solution would be to use the LITERAL slot type. 可能的解决方案是使用LITERAL插槽类型。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM