我正在尝试从 https://github.com/awslabs/aws-lex-web-ui#sample-site 运行示例 AWS-Lex-Web-UI
根据指示,我能够创建 cognito 池 ID,并将其保存在 chatbot-ui-loader-config.json 中,并尝试使用 npm start。服务器从 localhost:8000 启动,但我无法运行任何一个机器人命令。
是否有人已经使用示例示例在 WEB-UI 部分中实现了。我想将我的机器人从 AWS-LEX 导出到任何一台本地服务器。
chatbot-ui-loader-config.json:
{
"cognito": {
"poolId": "us-east-1:b3bxxxx-xxxx-45c7-xxxx-9xxxxxxxx"
},
"lex": {
"botName": "DataBot",
"initialText": "You can ask me for help rendering a file. Just type \"Render File\" or click on the mic and say it.",
"initialSpeechInstruction": "Say 'Render a file' to get started."
},
"polly": {
"voiceId": "Salli"
},
"ui": {
"parentOrigin": "",
"toolbarTitle": "File Processor"
},
"recorder": {
"preset": "speech_recognition"
}
}
最佳答案
检查浏览器控制台是否有任何错误。当我尝试这个时,它对我很有帮助。 以下是我在本地尝试之前经历的一些事情:
应正确设置 IAM 权限,例如认知池应有权访问 Lex,或者 Polly 应能够访问 Lex。 联合身份与用户池 - 我必须使用联合身份池。
关于node.js - AWS LEX Web UI 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47787960/