Dialogflow es 错误:没有为平台:DIALOGFLOW_控制台定义响应

Dialogflow es 错误:没有为平台:DIALOGFLOW_控制台定义响应,dialogflow-es,dialogflow-es-fulfillment,Dialogflow Es,Dialogflow Es Fulfillment,我正在尝试从Dialogflow中的API读取数据。下面是代码,但我得到了以下错误,看起来我已经在agent.add中定义了我的响应,但仍然得到了以下错误。我不是一个java专家,但我正在努力学习,也许我正在做一些语法错误。我不确定,但我会感谢你的时间和帮助。以下是我遇到的错误: Error: No responses defined for platform: DIALOGFLOW_CONSOLE at WebhookClient.send_ (/workspace/node_modules/

我正在尝试从Dialogflow中的API读取数据。下面是代码,但我得到了以下错误,看起来我已经在agent.add中定义了我的响应,但仍然得到了以下错误。我不是一个java专家,但我正在努力学习,也许我正在做一些语法错误。我不确定,但我会感谢你的时间和帮助。以下是我遇到的错误:

Error: No responses defined for platform: DIALOGFLOW_CONSOLE
at WebhookClient.send_ (/workspace/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:488:13)
    at promise.then (/workspace/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:306:38)
    at process._tickCallback (internal/process/next_tick.js:68:7)

textPayload: "Error: No responses defined for platform: DIALOGFLOW_CONSOLE
    at WebhookClient.send_ (/workspace/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:488:13)
    at promise.then (/workspace/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:306:38)
    at process._tickCallback (internal/process/next_tick.js:68:7)"
insertId: "000000-1fd08a04-56f8-4c82-b000-360724f95c3a"
resource: {2}
timestamp: "2020-10-21T19:07:49.495Z"
severity: "ERROR"
labels: {1}
logName: "projects/testbigquery-edjv/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
trace: "projects/testbigquery-edjv/traces/e8c0d32bfe9e582267667f01e30c1141"
receiveTimestamp: "2020-10-21T19:07:49.683046180Z"

Function execution took 1294 ms, finished with status: 'crash'
textPayload: "Function execution took 1294 ms, finished with status: 'crash'"
insertId: "000000-0840e9bd-0a4b-4ee3-bf4d-9a1e451a2c0f"
resource: {2}
timestamp: "2020-10-21T19:07:49.497111804Z"
severity: "DEBUG"
labels: {1}
logName: "projects/testbigquery-edjv/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
trace: "projects/testbigquery-edjv/traces/e8c0d32bfe9e582267667f01e30c1141"
receiveTimestamp: "2020-10-21T19:07:49.683046180Z"
我的代码如下:

//请参见https://github.com/dialogflow/dialogflow-fulfillment-nodejs
//用于Dialogflow履行库文档、示例和报告问题
"严格使用",;
const functions=require('firebase-functions');
const{WebhookClient}=require('dialogflow-fulfillment');
const{Card,Suggestion}=require('dialogflow-fulfillment');
const axios=require('axios');
process.env.DEBUG='dialogflow:DEBUG';//启用lib调试语句
exports.dialogflowFirebaseFulfillment=functions.https.onRequest((请求,响应)=>{
const-agent=new-WebhookClient({request,response});
log('Dialogflow请求头:'+JSON.stringify(Request.headers));
log('Dialogflow请求主体:'+JSON.stringify(Request.body));
函数getSpreadsheetData(){
返回axios.get('https://sheetdb.io/api/v1/y79vpk8pj29cv');
}
功能欢迎(代理){
const city=agent.parameters.city;
返回getSpreadsheetData()。然后(res=>{
res.data.map(person=>{
如果(person.City==城市)
agent.add(以下是${“city”}.CollectionC:${person.CollectionC},地址:${person.Address},电话:${person.Phone})的详细信息;
});
});
}
功能回退(代理){
代理。添加(我不明白);
添加(对不起,您能再试一次吗?);
}
////取消注释并编辑以生成自己的意图处理程序
////取消注释intentMap.set('yourtintent name here',yourFunctionHandler');
////在下面获取当Dialogflow意图匹配时要运行的函数
//函数处理程序(代理){
//add(此消息来自Dialogflow的Firebase编辑器云函数!);
//代理。添加(新卡)({
//标题:标题:这是一张卡片的标题,
//imageUrl:'https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png',
//文本:这是卡片的正文。您甚至可以使用换行符和表情符号!