添加两个数字连接它们而不是计算亚马逊 alexa 技能中的总和 node.js

Adding two numbers concatenates them instead of calculating the sum node.js in amazon alexa skill

在亚马逊 alexa 技能中将两个数字相加而不是计算总和 node.js 我附上了它的一些屏幕截图。

slot

here is the output image

code image

intent

我建议您使用 AMAZON.NUMBER 作为插槽类型。我认为这会奏效。

如果 built-in 插槽因任何原因不适合您的需要,那么您可以 Number(<slot_value>) 将字符串转换为数字。

希望对您有所帮助 :D 干杯