[英]Test Google Assistant is not connecting with my Dialogflow Webhook fulfillment
I have been building a simple chatbot in Dialogflow, and the las week I decided to test the chatbot in Google Assistant.我一直在 Dialogflow 中构建一个简单的聊天机器人,上周我决定在 Google Assistant 中测试聊天机器人。 I already tested the chatbot in Dialogflow and it connect with the web hook fulfillment and it works ok.
我已经在 Dialogflow 中测试了聊天机器人,它与 web 钩子实现连接并且工作正常。 But when I test it in google assistant, I'm getting and error from response.
但是当我在谷歌助手中测试它时,我收到了响应错误。
Google Assistant Response谷歌助理回应
Actually I'm testing the webhook fulfillment using ngrok and I put the temp url in the webhook.实际上,我正在使用ngrok测试 webhook 实现,并将临时 url 放入 webhook。 When I test it with the Dialogflow demo, I get the log when the Api is called.
当我使用 Dialogflow 演示对其进行测试时,我在调用 Api 时得到了日志。 But when I did it with Google Assistant, I don't get logs.
但是当我使用 Google Assistant 执行此操作时,我没有收到日志。 it is like if the api never was called.
就像从未调用过 api 一样。
I don't know if I did something bad or I didn't configure something in google assistant or Dialogflow.我不知道是我做错了什么,还是我没有在 google assistant 或 Dialogflow 中配置一些东西。
I'm working with nodejs using the library dialogflow-fulfillment and actions-on-google to get the post from Dialogflow and give the answer to Dialogflow and Google assistant.我正在使用库dialogflow -fulfillment和actions-on-google与 nodejs 合作,从 Dialogflow 获取帖子并将答案提供给 Dialogflow 和 Google 助手。
Response Google Assistant响应 Google 助理
{
"responseMetadata": {
"status": {
"code": 10,
"message": "Failed to parse Dialogflow response into AppResponse because of invalid platform response: Could not find a RichResponse or SystemIntent in the platform response for agentId: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n."
}
}
}
Debug Google Assistant调试谷歌助手
{
"response": "Sorry, Shell Virtual Agent isn't responding right now. Please try again soon.",
"expectUserResponse": false,
"conversationToken": "EosDS2o5ck...",
"audioResponse": "//NExAAPeD...",
"ssmlMarkList": [],
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=b8699f38e6954887882558306b2ef106&versionId=3' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: 'sadsd' -A Google-ActionsOnGoogle/1.0 -X POST -d '{\"user\":{\"locale\":\"en-US\",\"userVerificationStatus\":\"GUEST\"},\"conversation\":{\"conversationId\":\"ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"authentication-flow\\\",\\\"authentication-s3-email\\\",\\\"authentication-vars\\\",\\\"bill-my-value-high\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ed@jones.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"ed@jones.com\",\"textValue\":\"ed@jones.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}'",
"assistantToAgentJson": "{\"user\":{\"locale\":\"en-US\",\"userVerificationStatus\":\"GUEST\"},\"conversation\":{\"conversationId\":\"ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"authentication-flow\\\",\\\"authentication-s3-email\\\",\\\"authentication-vars\\\",\\\"bill-my-value-high\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ed@jones.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"ed@jones.com\",\"textValue\":\"ed@jones.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}",
"delegatedRequest": {
"delegatedRequest": ""
}
},
"agentToAssistantDebug": {
"agentToAssistantJson": "{\n \"responseMetadata\": {\n \"status\": {\n \"code\": 10,\n \"message\": \"Failed to parse Dialogflow response into AppResponse because of invalid platform response: Could not find a RichResponse or SystemIntent in the platform response for agentId: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\\nmessage: \\\"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\\\"\\n.\"\n }\n }\n}",
"delegatedResponse": {
"delegatedResponse": ""
}
},
"sharedDebugInfoList": [
{
"name": "ResponseValidation",
"debugInfo": "",
"subDebugEntryList": [
{
"name": "MalformedResponse",
"debugInfo": "Failed to parse Dialogflow response into AppResponse because of invalid platform response: Could not find a RichResponse or SystemIntent in the platform response for agentId: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n..",
"subDebugEntryList": []
}
]
}
],
"conversationBuilderExecutionEventsList": []
},
"conversationBuilderDebugInfo": {
"eventList": []
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Sorry, Shell Virtual Agent isn't responding right now. Please try again soon."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [
{
"operationType": 7,
"exitIndicatorPayLoad": {
"status": 1
}
}
],
"projectName": "",
"renderedHtml": "",
"previewStartTimeMicros": "1649805199475166",
"isEmptyResponse": false,
"agentName": "Shell Virtual Agent",
"servingModelOutdated": false
}
GCP Logging GCP 日志记录
{
"textPayload": "MalformedResponse: Failed to parse Dialogflow response into AppResponse because of invalid platform response: Could not find a RichResponse or SystemIntent in the platform response for agentId: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n.",
"insertId": "8lq5l0fp25rsx",
"resource": {
"type": "assistant_action",
"labels": {
"version_id": "",
"project_id": "shell-energy-ccai-poc-dev",
"action_id": "actions.intent.TEXT"
}
},
"timestamp": "2022-04-18T17:08:02.112767941Z",
"severity": "ERROR",
"labels": {
"source": "JSON_RESPONSE_VALIDATION",
"channel": "preview",
"querystream": "GOOGLE_USER"
},
"logName": "projects/shell-energy-ccai-poc-dev/logs/actions.googleapis.com%2Factions",
"trace": "projects/702646568948/traces/ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA",
"receiveTimestamp": "2022-04-18T17:08:02.122590076Z"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.