variable
variable

Reputation: 9694

Dialogflow - Not getting response that is configured in the Fulfillment Inline Editor

I am following the tutorial from: https://dialogflow.com/docs/getting-started/integrate-services-actions-on-google

I have setup the "Name" intent, configured a couple of Training phrases, and also a response. See below.

Training phrases:

  1. Do you have a name?
  2. What is your name?

Response: My name is Dialogflow!

Then, I went to the Fulfillment section and enabled the inline editor and pasted the following code:

   /**
 * 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)

Then clicked on Deploy.

Then went to the "Name" intent, and scrolled down to the Fulfillment section and enabled the "Enable webhook call for this intent."

Again went to the Fulfillment and clicked on Deploy.

Now, in the test chat window, when I enter "What's your name?", I get the response from the intent - that is - "My name is Dialogflow!"

However, I am expecting the reply from the Fulfillment inline editor code - that is - "My name is Dialogflowwwww!".

What could be the issue here?

Upvotes: 1

Views: 1149

Answers (2)

Amey P Naik
Amey P Naik

Reputation: 718

Try this in the 'Actions for Google console' by clicking the 'google assistant' link in the image shown. google assistant link

This is because you have used the 'Actions on google' client library for Google assistant.

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

Upvotes: 1

qwerty001
qwerty001

Reputation: 1

Remove the response from the "default" response within the intent definition

Upvotes: 0

Related Questions