【问题标题】:Dialogflow - Not getting response that is configured in the Fulfillment Inline EditorDialogflow - 未获得在 Fulfillment Inline Editor 中配置的响应
【发布时间】:2018-09-20 10:39:49
【问题描述】:

我正在学习来自:https://dialogflow.com/docs/getting-started/integrate-services-actions-on-google的教程

我已经设置了“名称”意图,配置了几个训练短语,以及一个响应。见下文。

训练短语:

  1. 你有名字吗?
  2. 你叫什么名字?

回应: 我叫 Dialogflow!

然后,我转到 Fulfillment 部分并启用内联编辑器并粘贴以下代码:

   /**
 * Copyright 2018 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

const functions = require('firebase-functions')
const { dialogflow } = require('actions-on-google')

const app = dialogflow()

app.intent('Default Welcome Intent', conv => {
  conv.ask('Welcome to my agent!')
})

app.intent('Default Fallback Intent', conv => {
  conv.ask(`I didn't understand`)
  conv.ask(`I'm sorry, can you try again?`)
})

app.intent('Name', conv => {
  conv.ask('My name is Dialogflowwwww!')
})

exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)

然后点击部署。

然后转到“名称”intent,向下滚动到 Fulfillment 部分并启用“为此 Intent 启用 webhook 调用”。

再次前往 Fulfillment 并点击 Deploy。

现在,在测试聊天窗口中,当我输入“你叫什么名字?”时,我得到了意图的响应 - 即 - “我的名字是 Dialogflow!”

但是,我期待来自 Fulfillment 内联编辑器代码的回复 - 即 - “我的名字是 Dialogflowwwww!”。

这可能是什么问题?

【问题讨论】:

  • 您能否更新您的问题以包含您配置的整个名称意图的屏幕截图?

标签: dialogflow-es


【解决方案1】:

点击图中所示的“Google 助手”链接,在“Actions for Google 控制台”中尝试此操作。

这是因为您使用了 Google 助理的“Actions on google”客户端库。

https://github.com/actions-on-google/actions-on-google-nodejs

【讨论】:

    【解决方案2】:

    从意图定义中的“默认”响应中删除响应

    【讨论】:

    • 您好,履行应该覆盖响应,删除它不是我正在寻找的解决方案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多