Skip to content

modified to use bot-alias-name instead of bot-name #7616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const userInput = "I want to reserve a hotel for tonight";

// Provide a bot name and user input

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update this comment as well?

const response = await Interactions.send({
botName: "TheBotName",
botName: "TheBotAliasName",
message: userInput
});

Expand All @@ -53,7 +53,7 @@ You can use `onComplete()` method to register a function to catch errors or chat
import { Interactions } from '@aws-amplify/interactions';

Interactions.onComplete({
botName: "TheBotName",
botName: "TheBotAliasName",
callback: (error?: Error, completion?: {[key: string]: any}) => {
if (error) {
alert('bot conversation failed');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Amplify.configure({
...Amplify.getConfig(),
Interactions: {
LexV2: {
'<your-bot-name>': {
'<your-bot-alias-name>': {
aliasId: '<your-bot-alias-id>',
botId: '<your-bot-id>',
localeId: '<your-bot-locale-id>',
Expand Down
Loading