如何为actions_intent_SIGN_IN提供自定义消息?

问题描述 投票:1回答:1

我想提供用于登录意图的自定义问题消息。

在DATETIME,我们可以提供自定义消息。

{
  "expectUserResponse": true,
  "expectedInputs": [
    {
      "possibleIntents": [
        {
          "intent": "actions.intent.DATETIME",
          "inputValueData": {
            "@type": "type.googleapis.com/google.actions.v2.DateTimeValueSpec",
            "dialogSpec": {
              "requestDatetimeText": "When would you like to schedule the appointment?",
              "requestDateText": "What day was that?",
              "requestTimeText": "What time works for you?"
            }
          }
        }
      ]
    }
  ]
}

对于SIGN_IN意图,没有这样的选项。

{
  "expectUserResponse": true,
  "expectedInputs": [
    {
      "possibleIntents": [
        {
          "intent": "actions.intent.SIGN_IN",
          "inputValueData": {
            "@type": "type.googleapis.com/google.actions.v2.SignInValueSpec"
          }
        }
      ]
    }
  ]
}
actions-on-google
1个回答
1
投票

您将需要optContent属性以及您要用于登录请求(一部分)的自定义文本。因此可能类似于

{
  "expectUserResponse": true,
  "expectedInputs": [
    {
      "possibleIntents": [
        {
          "intent": "actions.intent.SIGN_IN",
          "inputValueData": {
            "@type": "type.googleapis.com/google.actions.v2.SignInValueSpec",
            "optContext": "In order to know who you are"
          }
        }
      ]
    }
  ]
}
© www.soinside.com 2019 - 2024. All rights reserved.