首页 > 解决方案 > Alexa Skill:测试期间未更新交互模型

问题描述

我正在开发一个 Alexa 技能,我有一个最初有 7 个插槽的Intent名称。NewAppointmentIntentSlot昨天添加了一个新的命名Doctor并成功构建了技能。

当我调用该意图时,它仍然有 7 个插槽而不是 8 个。Doctor插槽不会出现在请求响应输出中。

图片中的意图:

在此处输入图像描述

在此处输入图像描述

output调用 , where 属性中的插槽Intent时:Doctorslots

"request": {
		"type": "IntentRequest",
		"requestId": "amzn1.echo-api.request.9529849e-190d-4278-95a8-3702b3ee4d1c",
		"timestamp": "2018-12-12T10:05:14Z",
		"locale": "en-US",
		"intent": {
			"name": "NewAppointmentIntent",
			"confirmationStatus": "NONE",
			"slots": {
				"Status": {
					"name": "Status",
					"confirmationStatus": "NONE"
				},
				"Comment": {
					"name": "Comment",
					"confirmationStatus": "NONE"
				},
				"ReasonForVisit": {
					"name": "ReasonForVisit",
					"confirmationStatus": "NONE"
				},
				"Time": {
					"name": "Time",
					"confirmationStatus": "NONE"
				},
				"EmergencyType": {
					"name": "EmergencyType",
					"confirmationStatus": "NONE"
				},
				"PatientNumber": {
					"name": "PatientNumber",
					"confirmationStatus": "NONE"
				},
				"Day": {
					"name": "Day",
					"confirmationStatus": "NONE"
				}
			}
		},
		"dialogState": "STARTED"
	}

所以我想知道如何刷新技能?

标签: aws-lambdaalexaalexa-skills-kitalexa-skillalexa-slot

解决方案


关闭窗口,重新打开并在控制台中 -> 保存模型 -> 构建模型。然后再次测试。

如果仍然不显示,请单击 JSON 编辑器(这将是您的交互模型列表中的最后一个选项),然后您NewAppointmentIntent可以在数组中看到Docter插槽吗?slots

如果不是,那么可能是在您创建插槽时出现了问题。所以删除Docter插槽并重新添加它。然后再次在 JSON 编辑器中验证它,这应该可以解决问题。


推荐阅读