voxa icon indicating copy to clipboard operation
voxa copied to clipboard

Dialogflow editor response has no filfillmentText when using v.3.3.0

Open patcat opened this issue 6 years ago • 0 comments

I've recently been experimenting with the newer versions of Voxa and Dialogflow, but I'm finding that in versions of Voxa after the change from DialogFlowPlatform to GoogleAssistantPlatform, whenever I test it out in Dialogflow, the response is "Not Available" — even though it does seem to send it through to Dialogflow in the response.

In quick summary, the fulfillmentText and fulfillmentMessages when using tell in a views.json model don't seem to come through. Only a richResponse?

For example, on a simple LaunchIntent:

image

If I look into the diagnostic info from Dialogflow though, I do see:

"richResponse": {
  "items": [
    {
      "simpleResponse": {
        "textToSpeech": "<speak>Welcome!</speak>"
      }
    }
  ]
},

image

The code I'm using is pretty simple and largely based on the hello-world example.

app.onIntent('LaunchIntent', (voxaEvent) => {
  const youSaid = _.get(voxaEvent, 'rawEvent.queryResult.queryText');
  console.log('Saw: ', youSaid);
  return {
    reply: 'LaunchIntent'
  };
});

When the response is given via sayp or textp is seems to work though:

app.onUnhandledState(async (voxaEvent) => {
  const youSaid = _.get(voxaEvent, 'rawEvent.queryResult.queryText');
  return {
    sayp: 'You said ' + youSaid,
    textp: 'You said ' + youSaid,
    flow: "terminate"
  };
});

image

"fulfillmentText": "You said unhandled huh?",
"fulfillmentMessages": [
  {
    "text": {
      "text": [
        "You said unhandled huh?"
      ]
    }
  }
],

Is this by design? Is there a new way to ensure Dialogflow also sees the messages and gets fulfillmentText and such?

Thank you for your help!

patcat avatar Sep 19 '19 01:09 patcat