通过履行文本将参数传递给对话流程

时间:2018-06-19 04:41:31

标签: dialogflow

addColor(index: number) {
  const colorGroup = this.fb.group({
    color: []
  })

  this.getColors(index).push(colorGroup);
        ^^^^^^^^^^^^
 use the them method to get correct FormArray
}

deleteColor(userIndex: number, colorIndex: number) {
  this.getColors(userIndex).removeAt(colorIndex);
}

输出没有传递到webhook,只有hello被打印在dialogflow控制台上。当我删除exports.webhook函数并且只是对城市进行硬编码时,输出将被打印在终端上。为什么会发生?< / p>

1 个答案:

答案 0 :(得分:0)

您的查询响应良好。 “ http://api.openweathermap.org/data/2.5/weather?APPID=7ffbb59524a81a6ac42ac3e942f68c5d&q=houston&units=imperial

因此,我将检查您的代理是否正在发送“ geo-city”参数。您说城市时,可以在dialogflow控制台的右下角看到它。 或console.log(city)来查看参数是否通过。如果没有解决您的dialogflow代理。

如果它正在发送参数,则在此行之后检查您的res或body是什么: request(host + path,function(error,res,body)

相关问题