2017-10-14 56 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