【问题标题】:Alexa Skill: Interaction model is not being updated during testAlexa Skill:测试期间未更新交互模型
【发布时间】:2019-05-13 10:07:14
【问题描述】:

我正在开发一个 Alexa Skill,我有一个名为 NewAppointmentIntentIntent,它最初有 7 个插槽。 我昨天添加了一个名为Doctor 的新Slot,并成功构建了技能。

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

图像中的意图:

调用Intent 时的output,其中slots 属性中的插槽Doctor 应为:

"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-lambda alexa alexa-skills-kit alexa-skill alexa-slot


    【解决方案1】:

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

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

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

    【讨论】:

    • 我只是尝试了所有这些,但没有任何改变。我的交互模型是最新的并包含所有插槽,但在测试期间它仍然没有出现在 JSON 中
    • 你看到JSON Editor了吗?另外,您的NewAppointmentIntent 是否有使用Docter 槽的话语?尝试使用此 Docter 槽向 NewAppointmentIntent 添加 2-3 多个话语。
    • JSON File Model 也与新插槽 Doctor 保持同步。如上所述进行构建后,在测试期间仍然无法正常工作。
    • 啊。我明白了,也许问题出在AMAZON.Number,您的输入值是整数,比如12123456789,但是AMAZON.Numberone 转换为1one hundred four 转换为104 等。 (请参阅此处的文档 - developer.amazon.com/docs/custom-skills/…)。对于您的插槽类型,创建一个自定义插槽并查看它是否有效或使用 AMAZON.SearchQuery(docs here - developer.amazon.com/docs/custom-skills/…)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-17
    • 1970-01-01
    • 1970-01-01
    • 2016-12-28
    相关资源
    最近更新 更多