我尝试连接对话流 and 在 Google 上的操作,所以我创建了一些意图,连接了服务,添加了显式和隐式调用等,但是当我在模拟器中尝试机器人时https://console.actions.google.com/project/[projectId]/simulator/ https://console.actions.google.com/project/%5BprojectId%5D/simulator/它总是给我错误:
“无法将 Dialogflow 响应解析为 AppResponse,异常
抛出消息:空话回应"
即使输入类型是“键盘”。
到目前为止我尝试过的:
- 我确实在对话框流中设置了“此选项卡的响应将发送到 Google Assistant 集成”(是否必须为每个意图都设置它?),但我没有看到任何额外的语音设置。
- 我禁用了第二语言,首先我也有德语的意图
- 我还关闭了 Fullfillment Webhook(在 API v1 中实现,然后也在 API v2 中实现),没有任何更改
- 我只找到这个用户有同样的问题https://productforums.google.com/forum/#!topic/dialogflow/xYjKlz31yW0;context-place=topicsearchin/dialogflow/Empty https://productforums.google.com/forum/#!topic/dialogflow/xYjKlz31yW0;context-place=topicsearchin/dialogflow/Empty$20speech$20response 但没有解决方案。
- 在意图中选中履行复选框
- 当我通过对话框流或 Web 演示中最右侧的“立即尝试”使用它时,该机器人工作正常https://bot.dialogflow.com/994dda8b-4849-4a8a-ab24-c0cd03b5f420 https://bot.dialogflow.com/994dda8b-4849-4a8a-ab24-c0cd03b5f420
不幸的是,文档没有提及此错误。有任何想法吗?
Here a screenshot of the error on the Actions integration:
![enter image description here](https://i.stack.imgur.com/6jUlL.png)
这是完整的调试输出:
{
"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"
}
]
}
]
}
另外“debugInfo”听起来像是一个内部问题:
“API 版本 2:无法解析 JSON 响应字符串
“INVALID_ARGUMENT”错误:\":找不到字段。\"."
Here a screenshot of the welcome intent:
![enter image description here](https://i.stack.imgur.com/iW5fq.png)
附:
我花了很长时间才弄清楚,什么
“自定义意图缺少查询模式”
意味着 - 所以我只是在这里记录它:在对话框流 - 意图 - “用户说”中,当您想要将其设置为查询参数时,您必须双击文本输入字段中的单词 - 这似乎是操作所必需的谷歌。