我使用nodejs(express)将rasa chatbot与AWS服务器上的google Assistant连接(我在AWS上部署了rasa chatbot),但没有收到任何响应(在nggrok的localhost上工作正常),但是每当我用AWS(域名),Google助手无法正常工作(无法建立连接),如何解决此问题?预先感谢
这是我的index.js
var request = require('request');
let rawInput = function (assistant) {
let rawInput = assistant.getRawInput();
request.post(
'http://xxxxxxx.amazonaws.com:8081/api/v1/240/respond',
{ json: { query: rawInput } },
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
info = JSON.parse(JSON.stringify(body));
assistant.ask(body[0].text);
}
else{
console.log(error);
}
}
);
这是我的action.json文件
{
"actions": [
{
"description": "Default Welcome Intent",
"name": "MAIN",
"fulfillment": {
"conversationName": "welcome"
},
"intent": {
"name": "actions.intent.MAIN",
"trigger": {
"queryPatterns":["talk to Place Finder"]
}
}
},
{
"description": "Rasa Intent",
"name": "TEXT",
"fulfillment": {
"conversationName": "rasa_intent"
},
"intent": {
"name": "actions.intent.TEXT",
"trigger": {
"queryPatterns":[]
}
}
}],
"conversations": {
"welcome": {
"name": "welcome",
"url": "https://xxxxxxx.amazonaws.com:3300/webhook",
"fulfillmentApiVersion": 2
},
"rasa_intent": {
"name": "rasa_intent",
"url": "https://xxxxxx.amazonaws.com:3300/webhook",
"fulfillmentApiVersion": 2
}
}
}