2017-10-14 59 views
1

我想导出我的Alexa的技能/导入Dialogflow(以前被称为API.AI),但我发现了以下错误消息:如何将Alexa技能导入API.AI/Dialogflow?

Invalid Alexa schema json file.

我的Zip文件是index.js文件和node_modules文件夹压缩在一起。然后我将名为schema.json的Alexa Skill JSON添加到了zip中,但它仍然给出了相同的错误。

我无法找到关于如何导出正确的Alexa .zip以供导入的说明,也不知道如何格式化zip以自行构建它。我一直在寻找一段时间 - 有谁知道如何做到这一点? (我通过电子邮件发送他们的支持了,但还没有回应。)

回答

0

下面是ZIP格式的例子:https://github.com/dialogflow/fulfillment-webhook-importer-nodejs/tree/master/skill/speechAssets

拉链应该有两个文件:IntentSchema.jsonSampleUtterances.txt

这里是如何获得IntentSchema.jsonSampleUtterances.txt: 转到https://developer.amazon.com/edw/home.html#/skills查看所有技能。 选择您希望通过点击技能名称对应的技术出口到技能: enter image description here 在左边从列表中选择“互动模式”,你应该看到下面的截图: enter image description here 复制内容然后将其粘贴到IntentSchema.json文件中并保存。 接着,内容复制到“样品话语”栏目的编辑和粘贴到您的SampleUtterances.txt文件并保存: enter image description here 最后拉上你的IntentSchema.json和SampleUtterances.txt文件,并将其上传到Dialogflow

+0

我很感激帮助,但是当我尝试上传带有这两个文件的zip文件时,我收到一个小弹出窗口,提示“文件speechAssets.zip没有上传。”没有更多细节。 – Bing

+0

您是否尝试过在示例中使用zip? https://github.com/dialogflow/fulfillment-webhook-importer-nodejs/blob/master/skill/speechAssets/speechAssets.zip – matthewayne

+0

@matthewayne DialogFlow是否支持Alexa Skill的对话指令? –

0

我不确定您是否仍在处理此问题,但如果其他人被卡住,您的zip文件必须正确读取IntentSchema.jsonSampleUtterances.txt