谷歌行动(ActionsSdkApp)意图不回应我的意图

时间:2018-01-29 15:37:59

标签: javascript google-api google-cloud-platform actions-on-google google-home

我为我的Google Action APP创建了一个Fulfillment,当我发送请求时,我得到了回复,但是我不明白这个意图有些奇怪。

我的action.json看起来像这样:

 {
  "actions": [
    {
      "description": "Default Welcome Intent",
      "name": "MAIN",
      "fulfillment": {
        "conversationName": "test"
      },
      "intent": {
        "name": "actions.intent.MAIN",
        "trigger": {
          "queryPatterns": [
            "talk to test"
          ]
        }
      }
    },
    {
      "description": "zweites intent",
      "name": "zwei",
      "fulfillment": {
        "conversationName": "test"
      },
      "intent": {
        "name": "zwei",
        "trigger": {
          "queryPatterns": [
            "starte zwei",
            "zwei",
            "komm schon"
          ]
        }
      }
    },
    {
      "description": "Everything Else Intent",
      "name": "allElse",
      "fulfillment": {
        "conversationName": "test"
      },
      "intent": {
        "name": "actions.intent.TEXT"
      }
    }
  ],
  "conversations": {
    "dpd": {
      "name": "test",
      "url": "someurl"
    }
  },
  "locale": "en"
}

当我说一个句子是我的queryPatterns的一部分时,它没有给我作为回应的意图。它总是以actions.intent.Text意图响应。

{
    "user": {
        "userId": "userid",
        "locale": "en-US",
        "lastSeen": "2018-01-29T15:06:04Z",
        "userStorage": "{\"data\":{}}"
    },
    "conversation": {
        "conversationId": "1234",
        "type": "ACTIVE",
        "conversationToken": "{\"state\":null,\"data\":{}}"
    },
    "inputs": [
        {
            "intent": "actions.intent.TEXT",
            "rawInputs": [
                {
                    "inputType": "KEYBOARD",
                    "query": "komm schon"
                }
            ],
            "arguments": [
                {
                    "name": "text",
                    "rawText": "komm schon",
                    "textValue": "komm schon"
                }
            ]
        }
    ],
    "surface": {
        "capabilities": [
            {
                "name": "actions.capability.AUDIO_OUTPUT"
            },
            {
                "name": "actions.capability.SCREEN_OUTPUT"
            },
            {
                "name": "actions.capability.MEDIA_RESPONSE_AUDIO"
            },
            {
                "name": "actions.capability.WEB_BROWSER"
            }
        ]
    },
    "isInSandbox": true,
    "availableSurfaces": [
        {
            "capabilities": [
                {
                    "name": "actions.capability.AUDIO_OUTPUT"
                },
                {
                    "name": "actions.capability.SCREEN_OUTPUT"
                }
            ]
        }
    ]
}

它不应该像“意图”那样回应“zwei”吗?因为那是他应该找到模式的地方。

1 个答案:

答案 0 :(得分:1)

使用Action SDK,模式匹配仅针对初始意图进行。之后,在会话期间,虽然您可以指定建议的意图,但它们通常会以TEXT意图发送给您。

Action SDK不是自然语言处理(NLP)系统。如果你正在寻找做NLP的东西,那么Actions与Dialogflow和Converse.AI直接集成,但是任何NLP系统都应该能够提供有关如何进行集成的信息。