Skip to content

Commit b62f30f

Browse files
authored
Merge pull request #834 from aws-samples/feature/remove-v1
Feature/remove v1
2 parents 196834d + 639c77c commit b62f30f

File tree

22 files changed

+400
-722
lines changed

22 files changed

+400
-722
lines changed

README-qbusiness.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This feature supports integration with file attachments, enable both to allow QB
1414
### Deploy the Web UI
1515
1. A deployment of the Lex Web UI with login enabled is required for Q Business integration. To launch a new deployment of the Web UI, go to the main [README](https://github.com/aws-samples/aws-lex-web-ui/blob/master/README.md) and select `Launch` for the region where your Q Business app is deployed.
1616

17-
2. The other bot fields for both V1 & V2 bots must be empty for the template to create the Q Business integration bot, please ensure that `Lex V1 Bot Configuration Parameters` and `Lex V2 Bot Configuration Parameters` are blank.
17+
2. The other bot fields for both V2 bots must be empty for the template to create the Q Business integration bot, please ensure that the `Lex V2 Bot Configuration Parameters` are blank.
1818

1919
3. To enable login, set `EnableCognitoLogin` to true. To force users to login to your bot, set `ForceCognitoLogin` to true. The ForceCognitoLogin setting will automatically redirect users to the login page if they are not logged in to the bot.
2020

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ to the latest supported versions.
278278
},
279279
lex: {
280280
// Lex Bot Name in your account
281-
botName: '<your lex bot name>'
281+
v2BotId: '<your lex bot id>'
282282
}
283283
};
284284
// load the LexWebUi component
@@ -373,7 +373,7 @@ page](#stand-alone-page) section.
373373
},
374374
lex: {
375375
// Lex Bot Name in your account
376-
botName: '<your lex bot name>'
376+
v2BotId: '<your lex bot id>'
377377
}
378378
};
379379
@@ -431,7 +431,7 @@ and Lex Bot name. For example, set the appropriate values in the
431431
"poolId": "us-east-1:deadbeef-fade-babe-cafe-0123456789ab"
432432
},
433433
lex: {
434-
"botName": "myHelpBot"
434+
"v2BotId": "ABC123"
435435
}
436436
...
437437
```

config/base.env.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ module.exports = {
3131
v2BotId: process.env.V2_BOT_ID,
3232
v2BotAliasId: process.env.V2_BOT_ALIAS_ID,
3333
v2BotLocaleId: process.env.V2_BOT_LOCALE_ID,
34-
botName: process.env.BOT_NAME,
35-
botAlias: process.env.BOT_ALIAS,
3634
initialText: process.env.BOT_INITIAL_TEXT,
3735
initialSpeechInstruction: process.env.BOT_INITIAL_SPEECH,
3836
initialUtterance: process.env.BOT_INITIAL_UTTERANCE,

lex-web-ui/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ You can import the library as a module and use it in your code:
5353
},
5454
lex: {
5555
initialText: 'How can I help you?',
56-
botName: 'helpBot',
57-
botAlias: '$LATEST',
56+
v2BotId: 'XYZ123',
5857
},
5958
ui: {
6059
toolbarTitle: 'Help Bot',
@@ -125,7 +124,7 @@ Mixing regions is not supported.
125124
// see the configuration section for details about the config fields
126125
const config = {
127126
cognito: { poolId },
128-
lex: { botName: 'MyBot', initialText: 'How can I help you?' },
127+
lex: { v2BotId: 'XYZ123', initialText: 'How can I help you?' },
129128
ui: { toolbarLogo: '', toolbarTitle: 'My Bot' },
130129
};
131130
@@ -534,7 +533,7 @@ Here's an example of the `config.dev.json` file:
534533
"poolId": "us-east-1:deadbeef-cac0-babe-abcd-abcdef01234",
535534
},
536535
"lex": {
537-
"bot": "MyLexBotName",
536+
"v2BotId": "XYZ123",
538537
...
539538
},
540539
"ui": {

lex-web-ui/package-lock.json

Lines changed: 329 additions & 286 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lex-web-ui/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"amazon-connect-chatjs": "^2.3.0",
2323
"@aws-sdk/client-cognito-identity": "3.470.0",
2424
"@aws-sdk/client-connect": "3.470.0",
25-
"@aws-sdk/client-lex-runtime-service": "3.470.0",
2625
"@aws-sdk/client-lex-runtime-v2": "3.470.0",
2726
"@aws-sdk/client-polly": "3.470.0",
2827
"@aws-sdk/client-s3": "3.470.0",

lex-web-ui/src/components/LexWeb.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,9 @@ import ToolbarContainer from '@/components/ToolbarContainer';
7474
import MessageList from '@/components/MessageList';
7575
import InputContainer from '@/components/InputContainer';
7676
// import { fromCognitoIdentityPool } from '@aws-sdk/credential-providers';
77-
import { LexRuntimeServiceClient } from '@aws-sdk/client-lex-runtime-service';
7877
import { LexRuntimeV2Client } from '@aws-sdk/client-lex-runtime-v2';
7978
import { PollyClient } from '@aws-sdk/client-polly';
8079
81-
82-
8380
export default {
8481
name: 'lex-web',
8582
data() {
@@ -203,7 +200,6 @@ export default {
203200
credentials: this.$lexWebUi.awsConfig.credentials,
204201
};
205202
206-
this.$lexWebUi.lexRuntimeClient = new LexRuntimeServiceClient(awsConfig);
207203
this.$lexWebUi.lexRuntimeV2Client = new LexRuntimeV2Client(awsConfig);
208204
this.$lexWebUi.pollyClient = new PollyClient(awsConfig)
209205
/* eslint-disable no-console */
@@ -214,7 +210,7 @@ export default {
214210
this.$store.dispatch('initMessageList'),
215211
this.$store.dispatch('initPollyClient', this.$lexWebUi.pollyClient, this.$lexWebUi.awsConfig.credentials),
216212
this.$store.dispatch('initLexClient', {
217-
v1client: this.$lexWebUi.lexRuntimeClient, v2client: this.$lexWebUi.lexRuntimeV2Client, credentials: this.$lexWebUi.awsConfig.credentials
213+
v2client: this.$lexWebUi.lexRuntimeV2Client, credentials: this.$lexWebUi.awsConfig.credentials
218214
}),
219215
];
220216
console.info('CONFIG : ', this.$store.state.config);

lex-web-ui/src/config/config.awstest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"apiGatewayEndpoint" : ""
1313
},
1414
"lex": {
15-
"botName": "QnABot_BotuU",
1615
"initialText": "This is from AWS TEST CONFING",
1716
"initialSpeechInstruction": "Say 'Order Flowers' to get started."
1817
},

lex-web-ui/src/config/config.dev.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"v2BotId": "",
1313
"v2BotAliasId": "",
1414
"v2BotLocaleId": "",
15-
"botName": "",
16-
"botAlias": "$LATEST",
1715
"initialText": "Type 'Buy Flowers' to get started.",
1816
"initialSpeechInstruction": "Say 'Buy Flowers' to get started.",
1917
"initialUtterance": "",

lex-web-ui/src/config/config.prod.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"poolId": ""
44
},
55
"lex": {
6-
"botName": "WebUiOrderFlowers",
76
"initialText": "You can ask me for help ordering flowers. Just type \"order flowers\" or click on the mic and say it.",
87
"initialSpeechInstruction": "Say 'Order Flowers' to get started."
98
},

0 commit comments

Comments
 (0)