通过ASP.NET Webhook发送动作时DialogFlow不触发事件意图

时间:2019-06-11 14:27:54

标签: c# dialogflow actions-on-google dialogflow-fulfillment asp.net-webhooks

我正在按照本教程dialogflow fulfillment with c and app engine构建.NET Webhook。

一切正常,除非我想使用RegisterUpdate Intent设置DailyUpdates。

当“ setup_notification_update”意图调用Webhook时,我将发送这种JSON作为响应:

{
  "fulfillmentText": "Notifica programmata",
  "fulfillmentMessages": [
    {
      "card": {
        "title": "Notifica programmata",
        "subtitle": "Notifica programmata con successo",
        "imageUri": "https://assistant.google.com/static/images/molecule/Molecule-Formation-stop.png",
        "buttons": [
          {
            "text": "Valutami",
            "postback": "https://macoev.com/"
          }
        ]
      }
    }
  ],
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "Questa è la risposta di avvenuto successo per la programmazione della notifica"
            }
          }
        ]
      },
      "systemIntent": {
        "intent": "actions.intent.REGISTER_UPDATE",
        "data": {
          "@type": "type.googleapis.com/google.actions.v2.RegisterUpdateValueSpec",
          "intent": "get_stats_notification",
          "arguments": [
            {
              "name": "category",
              "textValue": "Daily_lowest_temperature"
            }
          ],
          "triggerContext": {
            "timeContext": {
              "frequency": "DAILY"
            }
          }
        }
      }
    }
  }
}

问题在于,以REGISTER_UPDATE作为其事件的意图不会被触发,从而导致未计划通知。 这是我触发该事件时设置的响应:

{
  "responseId": "",
  "queryResult": {
    "queryText": "",
    "action": "",
    "parameters": {},
    "allRequiredParamsPresent": true,
    "fulfillmentText": "",
    "fulfillmentMessages": [],
    "outputContexts": [],
    "intent": {
      "name": "finish_update_setup",
      "displayName": "finish_update_setup"
    },
    "intentDetectionConfidence": 1,
    "diagnosticInfo": {},
    "languageCode": ""
  },
  "originalDetectIntentRequest": {
    "source": "google",
    "version": "2",
    "payload": {
      "isInSandbox": true,
      "surface": {
        "capabilities": [
          {
            "name": "actions.capability.SCREEN_OUTPUT"
          },
          {
            "name": "actions.capability.AUDIO_OUTPUT"
          },
          {
            "name": "actions.capability.MEDIA_RESPONSE_AUDIO"
          },
          {
            "name": "actions.capability.WEB_BROWSER"
          }
        ]
      },
      "inputs": [
        {
          "rawInputs": [],
          "intent": "",
          "arguments": [
            {
              "name": "REGISTER_UPDATE",
              "extension": {
                "@type": "type.googleapis.com/google.actions.v2.RegisterUpdateValue",
                "status": "OK"
              }
            },
            {
              "name": "text",
              "rawText": "04:10pm",
              "textValue": "04:10pm"
            }
          ]
        }
      ],
      "user": {},
      "conversation": {},
      "availableSurfaces": [
        {
          "capabilities": [
            {
              "name": "actions.capability.SCREEN_OUTPUT"
            },
            {
              "name": "actions.capability.AUDIO_OUTPUT"
            },
            {
              "name": "actions.capability.MEDIA_RESPONSE_AUDIO"
            },
            {
              "name": "actions.capability.WEB_BROWSER"
            }
          ]
        }
      ]
    }
  },
  "session": ""
}

知道为什么吗?任何帮助将不胜感激。预先感谢。

0 个答案:

没有答案