0

我正在按照本教程构建一个 .NET Webhook,使用 c 和 app engine 实现对话流

一切正常,除非我想使用 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": ""
}

知道为什么吗?任何帮助将不胜感激。提前致谢。

4

0 回答 0