我正在将React App与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}
/>