Today AWS announced that developers can now export their Amazon Lex chatbot schema into an Alexa-compatible format for use in an Alexa skill. This enables developers to offer users even more ways to interact with Amazon Lex powered conversational chatbots.
How It Works
When you create any kind of conversational experience, you need to build an interaction model that maps a user’s spoken input to the intents your service can handle. You use an intent schema to define a set of valid intents, which are actions that fulfill a user’s spoken request.
Amazon Lex now provides the ability to export your Amazon Lex chatbot definition as a JSON file. You can then use the bot schema file to build an Alexa skill and reach customers through Alexa-enabled devices including the Amazon Echo, Amazon Dot, Amazon Look, Amazon Tap, Amazon Echo Show, and third-party devices with Alexa. The JSON configuration file contains the structure of your Amazon Lex chatbot including the intent schema with utterances, slots, prompts and slot types.
Create a skill from this file once downloaded by following these steps:
- Log in to the Alexa Developer Portal
- Start a new skill or select your existing skill
- Navigate to the "Interaction Model" tab
- Launch the Skill Builder (Beta) and select "Code Editor" on the left pane
- Paste your Amazon Lex bot definition JSON into the Code Editor
- Select “Build Model” from the top menu
- Create a custom back end for your skill in AWS Lambda
- Connect the Lambda Function to your Interaction Model
- Complete any other updates to your skill information, interaction model, or publishing information
- Submit your skill for publication
This export functionality is available through the Amazon Lex console, or through the AWS SDK with PutExport and GetExport.
What Is Amazon Lex?
Amazon Lex is a service for building conversational interactions into any application using voice and text. With Amazon Lex, the same deep learning technologies that power Amazon Alexa are now available to any developer, enabling you to quickly and easily build sophisticated, natural language, conversational bots (“chatbots”). Amazon Lex chatbots support both voice and text and are a great solution if you want to build a stand-alone bot or create a bot that works on multiple platforms (including Facebook Messenger, Slack and Twilio SMS).
Source: Alexa Developer Blog