amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Amazon Lex 2

Open wcomicho opened this issue 3 years ago • 17 comments

Does Amplify support Amazon Lex version 2?

Was able to use version 1 of Amazon Lex using AWS Amplify React using Interactions library but not able to do so with the same setup for Amazon Lex version 2.

Sharing some code below that is working on version 1 but not in version 2:

Amplify.configure({ Auth: { identityPoolId: 'us-east-1:mypoolidhere', region: 'us-east-1' }, Interactions: { bots: { "Test": { "name": "Test", "alias": "Test", "region": "us-east-1", }, } } });

<AmplifyChatbot

botName="Test"
botTitle="Test"
welcomeMessage="Hello, how can I help you?"

/>

Appreciate your help on this.

Thanks

wcomicho avatar Jan 28 '21 05:01 wcomicho

Hi,

Usually, how fast to these feature requests get implemented? Do you accept volunteers as testers?

Thanks Wil

wcomicho avatar Feb 17 '21 03:02 wcomicho

please we need LEX2 compability

gino8080 avatar Aug 03 '21 13:08 gino8080

Hello, is this already available?

howdyhyber avatar Aug 05 '21 09:08 howdyhyber

Deleted - Amplify added official support for Lex2

thefat32 avatar Sep 15 '21 16:09 thefat32

Deleted - Amplify added official support for Lex2

thefat32 avatar Sep 18 '21 23:09 thefat32

Although its nice that a third-party has invested his/her time in supporting V2. It would be better if this is supported by default from AWS. What will be the timeline on supporting Lex V2 ??

jeroenmeulendijks avatar Oct 24 '21 13:10 jeroenmeulendijks

I totally agree with @jeroenmeulendijks

thefat32 avatar Oct 25 '21 13:10 thefat32

Hey folks, I wanted to provide an update here. We are looking to add this support of Lex 2. However, at this time, it's looking to be early next year, 2022, that this will be worked on. We will provide more details in the coming weeks around this. Thanks for using Amplify !!

sammartinez avatar Nov 17 '21 22:11 sammartinez

Any update on this please?

ramit21 avatar Jan 23 '22 11:01 ramit21

Would be keen for official LEX v2 support also

MattJColes avatar May 23 '22 10:05 MattJColes

Still not implemented? Seems a long time coming..

wcheek avatar Jun 17 '22 06:06 wcheek

@MattJColes and @wcheek - would love to understand a bit more what your use cases are, and why you would need support for Amazon Lex v2.

abdallahshaban557 avatar Jun 18 '22 00:06 abdallahshaban557

@abdallahshaban557 Lex v2 is promoted as the newest version of the Lex service - why would I use v1 instead? V2 has been available for over a year. I spent a lot of time developing a chatbot using the v2 framework. It's unreasonable to ask me now to 'downgrade' just because Amplify doesn't support the newest version of an AWS service.

wcheek avatar Jun 20 '22 01:06 wcheek

@wcheek - totally get that. We wanted to see if there are pieces of functionality that you are looking for that we do not have APIs exposed for other than upgrading to Lex V2.

abdallahshaban557 avatar Jun 21 '22 21:06 abdallahshaban557

@abdallahshaban557 - this will probably come off in a wrong way but wasn't meant to: should there be an API functionality needed before you support the next version of already supported AWS services? More than a year of lead time seems slow.

larsrnielsenus avatar Jun 28 '22 12:06 larsrnielsenus

Any updates on this? I have already built a bot using Lex v2. But now not able to find any option to integrate it with application. I was looking for some similar component to integrate rather than deploying a cloudformation template and spinup loads of resources like S3 bucket, Lambda, Cloud Front, Code build, etc, etc.

I am referring to the outcome of running cloudformation template from following article: https://aws.amazon.com/blogs/machine-learning/deploy-a-web-ui-for-your-chatbot/. This appears to be too much for what is expected.

shridhar-tl avatar Jul 17 '22 04:07 shridhar-tl

Hey folks, We're working on adding API support for Lex V2.

The usage will be as follows

import { Amplify, Interactions } from 'aws-amplify';
import { AWSLexV2Provider } from '@aws-amplify/interactions';

Interactions.addPluggable(new AWSLexV2Provider());

const interactionsConfig = {
    Auth: {
        identityPoolId: "<identityPoolId>",
        region: "<region>"
    },
    Interactions: {
        bots: {
            my_v1_bot: { // default provider "AWSLexProvider"
                name: "my_v1_bot",
                alias: "$LATEST",
                region: "<region>",
            },
            my_v2_bot: {
                name: "my_v2_bot",
                aliasId: "<aliasId>",
                botId: "<botId>",
                localeId: "<localeId>",
                region: "<region>",
                providerName: "AWSLexV2Provider",
            },
        }
    }
}

Amplify.configure(interactionsConfig);

ashwinkumar6 avatar Aug 02 '22 16:08 ashwinkumar6

@wcomicho @gino8080 @howdyhyber @thefat32 @MattJColes @jeroenmeulendijks @shridhar-tl @larsrnielsenus @ramit21 Amplify JS now supports Lex V2 ([email protected]), as @ashwinkumar6 mentioned you can use Lex V2 on JS library like this.

import { Amplify, Interactions } from ‘aws-amplify’;
import { AWSLexV2Provider } from ‘@aws-amplify/interactions’;
Interactions.addPluggable(new AWSLexV2Provider());
const interactionsConfig = {
    Auth: {
        identityPoolId: “<identityPoolId>“,
        region: “<region>”
    },
    Interactions: {
        bots: {
            my_v1_bot: { // default provider “AWSLexProvider”
                name: “my_v1_bot”,
                alias: “$LATEST”,
                region: “<region>“,
            },
            my_v2_bot: {
                name: “my_v2_bot”,
                aliasId: “<aliasId>“,
                botId: “<botId>“,
                localeId: “<localeId>“,
                region: “<region>“,
                providerName: “AWSLexV2Provider”,
            },
        }
    }
}
Amplify.configure(interactionsConfig);

Big Kudos to @thefat32 and @ashwinkumar6 for their contribution! 🎉 🎖️

elorzafe avatar Sep 06 '22 16:09 elorzafe

@wcomicho @gino8080 @howdyhyber @thefat32 @MattJColes @jeroenmeulendijks @shridhar-tl @larsrnielsenus @ramit21 Amplify JS now supports Lex V2 ([email protected]), as @ashwinkumar6 mentioned you can use Lex V2 on JS library like this.

import { Amplify, Interactions } from ‘aws-amplify’;
import { AWSLexV2Provider } from ‘@aws-amplify/interactions’;
Interactions.addPluggable(new AWSLexV2Provider());
const interactionsConfig = {
    Auth: {
        identityPoolId: “<identityPoolId>“,
        region: “<region>”
    },
    Interactions: {
        bots: {
            my_v1_bot: { // default provider “AWSLexProvider”
                name: “my_v1_bot”,
                alias: “$LATEST”,
                region: “<region>“,
            },
            my_v2_bot: {
                name: “my_v2_bot”,
                aliasId: “<aliasId>“,
                botId: “<botId>“,
                localeId: “<localeId>“,
                region: “<region>“,
                providerName: “AWSLexV2Provider”,
            },
        }
    }
}
Amplify.configure(interactionsConfig);

Big Kudos to @thefat32 and @ashwinkumar6 for their contribution! 🎉 🎖️

Somebody knows how can I use this inside a react component?

xvimnt avatar Oct 25 '22 20:10 xvimnt

@xvimnt What is the reason for trying to configure Amplify inside of a react component? It is recommended you add the Amplify configuration step to your app's root entry point (App.js)

tannerabread avatar Oct 25 '22 21:10 tannerabread