Wednesday 31 May 2017

API.AI webhook not being called for fulfillment

I am trying to call a webhook in an intent. My webhook url is a simple node.js code on heroku which just returns a text: https://sf-fb.herokuapp.com/

It does not require any authentication or API key. In my intent I have enabled the "Use Webhook" checkbox for Fulfillment and enabled my webhook as well. However whenever I type the user query in the chat box it gives me my default response.

enter image description here

When I clicked SHOW JSON it shows:

{
  "id": "fb8a4f13-7bbd-497b-9702-d329a9352d9f",
  "timestamp": "2017-05-31T04:52:04.16Z",
  "lang": "en",
  "result": {
    "source": "agent",
    "resolvedQuery": "random fact",
    "action": "",
    "actionIncomplete": false,
    "parameters": {},
    "contexts": [],
    "metadata": {
      "intentId": "74380a44-fc4f-49a0-910c-ad4510bfa5c9",
      "webhookUsed": "true",
      "webhookForSlotFillingUsed": "false",
      "webhookResponseTime": 77,
      "intentName": "random fact"
    },
    "fulfillment": {
      "speech": "what random fact?",
      "messages": [
        {
          "type": 0,
          "speech": "what random fact?"
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 206,
    "errorType": "partial_content",
    "errorDetails": "Webhook call failed. Error: Webhook response was empty."
  },
  "sessionId": "6971416c-3087-42ef-8165-d9b152494c88"
}

It says code: 206, failed to call webhook. I have tested my webhook and it works. I posted this same question in their forum but no one answered. Their support is pathetic and wont reply to my queries.

I don't see what I am doing wrong. Can anyone help?



via codeinprogress

No comments:

Post a Comment