我试图关注documentation about App Exit handling,但似乎没有正常工作。 (见下面我意图的屏幕截图)。
当我这样做时,它似乎诉诸于我的默认回退意图,虽然它确实表明resolvedQuery
是actions_intent_CANCEL
,这应该是正确的。 (参见下面的JSON主体。)
我做错了什么,或者说文档错了?
意图试图处理它:
JSON正文:
{
"originalRequest": {
"source": "google",
"version": "2",
"data": {
"isInSandbox": true,
"surface": {
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
},
"inputs": [
{
"rawInputs": [
{}
],
"intent": "actions.intent.CANCEL"
}
],
"user": {
"locale": "en-US",
"userId": "AETml1QP6omTPEXBfrOBdvNlwHxY"
},
"conversation": {
"conversationId": "1509314271837",
"type": "ACTIVE",
"conversationToken": "[]"
},
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
}
},
"id": "bbd363aa-f555-4543-a748-294751194fa9",
"timestamp": "2017-10-29T21:58:00.691Z",
"lang": "en-us",
"result": {
"source": "agent",
"resolvedQuery": "actions_intent_CANCEL",
"speech": "",
"action": "input.unknown",
"actionIncomplete": false,
"parameters": {},
"contexts": [
{
"name": "actions_intent_cancel",
"parameters": {},
"lifespan": 0
},
{
"name": "actions_capability_screen_output",
"parameters": {},
"lifespan": 0
},
{
"name": "actions_capability_audio_output",
"parameters": {},
"lifespan": 0
}
],
"metadata": {
"intentId": "25f6e14b-a92c-479b-8943-76c4b6914579",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"nluResponseTime": 2,
"intentName": "Default Fallback Intent"
},
"fulfillment": {
"speech": "I'm sorry. I didn't quite grasp what you just said.",
"messages": [
{
"type": 0,
"id": "535c3b80-f13d-4b61-8c1d-bb58fa3f5e44",
"speech": "I'm a bit confused by that last part."
}
]
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "1509314271837"
}
答案 0 :(得分:2)
除documentation中的步骤外,我发现我必须告诉模拟器更新到最新版本!
这是我的视频,概述了我采取的步骤。 https://www.youtube.com/watch?v=ZvZDokjhUIY
答案 1 :(得分:1)