How to import Alexa skill into API.AI / Dialogflow?

孤街醉人 提交于 2019-12-10 17:16:40

问题


I'm trying to export my Alexa Skill / import it into Dialogflow (used to be called API.AI), but I'm getting the following error message:

Invalid Alexa schema json file.

My Zip file is the index.js file and the node_modules folder zipped together. Then I added the Alexa Skill JSON named schema.json to the zip too, but it still gives the same error.

I cannot find instructions on how to export the correct Alexa .zip for import, nor how to format the zip to build it myself. I've been searching for a while -- does anyone know how to do this? (I emailed their support already, but no response yet.)


回答1:


There were some updates to the Alexa Interaction Model, so the Dialogflow Alexa Importer doesn't seem to work anymore.

There are a few things to consider when porting an Alexa Model into a Dialogflow Agent:

  • Built-in Intents: You need to create custom Dialogflow intents for built-in Alexa intents like AMAZON.HelpIntent
  • Built-in Slots: Amazon offers a large variety of slots (e.g. AMAZON.Number) that need to be converted to Dialogflow. For this, Dialogflow offers System Entities. Find all System Entities here.

I created a complete step by step guide and video that uses the Jovo Language Model to translate an Alexa Model into a Dialogflow Agent. You can find it here: Tutorial: Turn an Alexa Interaction Model into a Dialogflow Agent.




回答2:


Here is an example of the format for the zip: https://github.com/dialogflow/fulfillment-webhook-importer-nodejs/tree/master/skill/speechAssets

The zip should have two files: IntentSchema.json and SampleUtterances.txt

Here is how to get IntentSchema.json and SampleUtterances.txt: Go to https://developer.amazon.com/edw/home.html#/skills to view all your skills. Select the skill you'd like to export to by clicking on the skill name for the corresponding skill: On the left select "Interaction Model" from the list and you should see the screenshot below: Copy the contents of the the editor and paste it into your IntentSchema.json file and save it. Next, copy the contents into the editor of the "Sample Utterances" section and paste into your SampleUtterances.txt file and save: Lastly zip up your IntentSchema.json and SampleUtterances.txt files and upload them to Dialogflow




回答3:


I'm not sure if your still working on this but if anyone else is stuck, the files you zip have to read IntentSchema.json and SampleUtterances.txt exactly.



来源:https://stackoverflow.com/questions/46748429/how-to-import-alexa-skill-into-api-ai-dialogflow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!