Dialogflow/API.ai Amazon Echo integration: Simple plain text bot for testing

扶醉桌前 提交于 2019-12-24 09:50:10

问题


I have been trying to make my simple test bot (it's just a single intent with three different text based responses) and hook it up to my amazon echo for a proof of concept demo.

I am having trouble with the amazon side of the integration. Here are my questions:

  1. How do I make it so I can test my skill on my echo. Do I need to publish it even before I can test it? How does it work
  2. How do I make my echo communicate with the api.ai/dialogflow server to get the response I want?
  3. What link do I fill in in the 'Endpoint' part of the configuration
  4. What is the SSL Certificate and how do I configure it?

All I want my bot to do with alexa is to recognise what I say and reply with a simple text answer...

Thanks for helping me out!


回答1:


Here is what you need to do.

  1. Follow the instruction at https://dialogflow.com/docs/integrations/alexa-exporter to export your DialogFlow interaction model and sample utterances and to create the skill in http://developer.amazon.com.
  2. You will need to create a skill service (the 'Endpoint') that calls the DialogFlow API to send and receive requests / responses between DialogFlow and the Amazon Alexa Service. I'd do that with AWS Lambda - that way you won't have to worry about configuring an SSL certificate.

After you have a skill property configured in the Amazon Developer Console you can 'enable testing' in the skill configuration to make it possible to test the skill before it's published.

Here is a video I did that walks through creating a custom Alexa skill. All of the steps in the video would apply for what you're trying to do but in addition you'd need to call the DialogFlow API using one of the DialogFlow SDKs which you can find at https://dialogflow.com/docs/sdks. If you decide to use AWS Lambda for your skill service endpoint, I'd suggest using Node.JS and the Node.JS SDK for DialogFlow.

Suggestion. If you're goal is to create a simple skill for Alexa, it might be simpler to just create the skill without DialogFlow. If you want a skill that works both for Amazon Alexa and Google Home I'd check out the Jovo Framework.

Also, for more videos on creating Alexa skills visit http://youtube.com/dabblelab or http://learn.dabblelab.com

I hope this helps!




回答2:


So after long search around the web:

  1. You need to apply for amazon alexa beta testing.
  2. I have not found a way, it was easier to just hook it up with a webhook to my own server
  3. The link to your webhook
  4. SSL certificate is needed for the HTTPS secure connection. I couldn't test locally without a certificate so I just pushed my code to the server each time I edited it (it didn't share any code with other classes)

That's it



来源:https://stackoverflow.com/questions/47155026/dialogflow-api-ai-amazon-echo-integration-simple-plain-text-bot-for-testing

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