I am using Amplify.Interactions (Lex) in a Vue.js project. I can successfully send and receive text messages. I am having difficulties specifying requestAttributes or sessionAttributes value on my request. Does anyone know how to solve it? Thank you.
The following code works
Interactions.send("botname", {
content: "some text,
options: {
messageType: "text"
}
})
.then(response => {
logger.log(response);
})
.catch(error => {
logger.error(error);
});
But when I try to send the following object (in content) the bot doesn't identify the correct intent.
JSON.stringify({
inputText: "some text",
sessionAttributes: { attr1: "val1", attr2: "val2" }
})