ele*_*abe 6 actions-on-google google-assistant-sdk dialogflow-es
我试图在Google上连接DialogFlow和Actions,所以我创建了一些意图,连接了服务,添加了显式和隐式调用等,但是当我在模拟器中尝试机器人时https://console.actions.google.com/project/ [projectId]/simulator /它总是给我错误:
"无法将Dialogflow响应解析为AppResponse,异常抛出消息:空语音响应 "
即使是艰难的inputType也是"KEYBOARD".
到目前为止我尝试了什么:
不幸的是,文档没有说明这个错误.有任何想法吗?
这是完整的调试输出:
{
"agentToAssistantDebug": {
"agentToAssistantJson": {
"message": "Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response",
"apiResponse": {
"id": "c12e1389-e887-49d4-b399-a332188ca946",
"timestamp": "2018-01-27T03:55:30.931Z",
"lang": "en-us",
"result": {},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "1517025330705"
}
}
},
"assistantToAgentDebug": {
"assistantToAgentJson": {
"user": {
"userId": "USER_ID",
"locale": "en-US",
"lastSeen": "2018-01-27T03:55:03Z"
},
"conversation": {
"conversationId": "1517025330705",
"type": "NEW"
},
"inputs": [
{
"intent": "actions.intent.MAIN",
"rawInputs": [
{
"inputType": "KEYBOARD",
"query": "Talk to Mica, the Hipster Cat Bot"
}
]
}
],
"surface": {
"capabilities": [
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
},
"isInSandbox": true,
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
},
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=TOKEN' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: AUTH_TOKEN' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"USER_ID\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-27T03:55:03Z\"},\"conversation\":{\"conversationId\":\"1517025330705\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to Mica, the Hipster Cat Bot\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"
},
"sharedDebugInfo": [
{
"name": "ResponseValidation",
"subDebugEntry": [
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
"debugInfo"听起来像是一个内部问题:
"API Version 2:无法使用'INVALID_ARGUMENT'错误解析JSON响应字符串:\":找不到字段.\ ""
PS.我花了很多时间才弄明白
"自定义意图缺少查询模式"
意思是 - 所以我只是在这里记录它:在Dialog Flow中 - 意图 - "用户说"当你想将它设置为查询参数时,你必须在文本输入字段中单击一个单词 - 这似乎是Actions on谷歌.
这发生在我身上.如果您刚刚在Dialogflow控制台中添加了Intent,并且您正在使用Webhook实现操作,请检查intent的实现设置并确保Webhook实现滑块已打开.显然,新的意图不会自动获得webhook履行:你必须零碎地选择每一个(或者至少,这是我的经验).
| 归档时间: |
|
| 查看次数: |
7740 次 |
| 最近记录: |