我正在将 react 应用程序与 aws Lex Chatbot 集成,
我已按照本文档中指定的手动过程 - https://aws-amplify.github.io/docs/js/interactions
并且每次,当我发送一条消息,我被以下错误消息触发
错误:未处理的拒绝(MissingRequiredParameter):参数中 缺少必需的键“userId”
有人可以帮我解决这个问题吗...
这就是我发送请求的方式
Amplify.configure({
Auth: {
identityPoolId: 'us-east-1:xxxx-xxxx',
region: 'US_EAST_1',
},
Interactions: {
bots: {
"Chatbot": {
"name": "Chatbot",
"alias": "Bot1",
"region": "US_EAST_1",
},
},
}
});
组件:
<ChatBot
title="My Bot"
theme={myTheme}
botName="Chatbot"
welcomeMessage="Welcome, how can I help you today?"
onComplete={this.handleComplete.bind(this)}
clearOnComplete={true}
conversationModeOn={true}
/>