gpt4 book ai didi

firebase - Actions on Google 以 "Sorry, I didn' 响应,但未得到任何响应。”

转载 作者:行者123 更新时间:2023-12-01 11:19:13 26 4
gpt4 key购买 nike

我正在关注此代码实验室 Facts about You: Build a conversational app for the Google Assistant

我让它工作了一次,但一定是做错了什么,因为现在全部。为了 100% 清楚,我已经删除了我电脑上的所有内容,从 Git 下载了代码,再次删除了操作控制台中的项目,删除了 api.ai 中的项目。这是全新安装的结果。 我没有更改代码实验室中的任何内容。

"Sorry, I didn't get any response."

请求似乎正确发送

来自 Action 测试:

{
"conversationToken": "CiZDIzU5Ym...",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "tell me about cats",
"surface": "GOOGLE_HOME"
}

在火力基地收到

 [{"name":"actions.capability.AUDIO_OUTPUT"}]},"inputs":[{"rawInputs":[{"query":"tell me about cats","inputType":"VOICE"}],"arguments":[{"rawText":"tell me about cats","textValue":"tell me about cats","name":"text"}],"intent":"actions.intent.TEXT"}],"user":{"locale":"en-US","userId":"AETml1RzwqyijfbawqjZkRSXz-P1"},"device":{},"conversation":{"conversationId":"1504878811393","type":"ACTIVE","conversationToken":"[\"_actions_on_google_\",\"choose_fact-followup\"]"}}},"id":"3b97e239-346f-49a2-a106-96cfb6f69e92","timestamp":"2017-09-08T13:58:29.99Z","lang":"en","result":{"source":"agent","resolvedQuery":"tell me about cats","speech":"","action":"tell.cat.fact","actionIncomplete":false,"parameters":{},"contexts":[{"name":"_actions_on_google_","parameters":{"category.original":"headquarters","category":"headquarters","facts":{"content":{"headquarters":["Google has over 10 fitness facilities in its main campus."],"history":["Google was founded in 1998.","Google was founded by Larry Page and Sergey Brin.","Google went public in 2004.","Google has more than 70 offices in more than 40 countries."]}}},"lifespan":98},{"name":"actions_capability_audio_output","parameters":{},"lifespan":0},{"name":"google_assistant_input_type_voice","parameters":{},"lifespan":0},{"name":"choose_cats-followup","parameters":{},"lifespan":2}],"metadata":{"intentId":"14df3938-3776-477c-811c-d1758ecd15cb","webhookUsed":"true","webhookForSlotFillingUsed":"false","nluResponseTime":19,"intentName":"choose_cats"},"fulfillment":{"speech":"","messages":[{"type":0,"speech":""}]},"score":1},"status":{"code":200,"errorType":"success"},"sessionId":"1504878811393"}

对 Action 的响应

{
"audioResponse": "//NExAARAA...",
"conversationToken": "CiZDIzU5Ym...",
"expectUserResponse": true,
"response": "Sorry, I didn't get any response.",
"visualResponse": {
"visualElements": []
}
}

我一定是遗漏了什么。 Firebase 正在接收请求,只是没有正确响应。

训练图像

enter image description here

最佳答案

如果您的网络 Hook 未向助手提供响应,则会出现该错误。云函数触发或超时,未返回JSON给助手解析。检查云函数的输出是什么,并根据 API.AI 网络 Hook 格式检查它 https://developers.google.com/actions/reference/v1/apiai-webhook

它应该看起来像这样:

{
"speech": "...", // ASCII characters only
"displayText": "...",
"data": {
"google": {
"expect_user_response": true,
"is_ssml": true,
"permissions_request": {
"opt_context": "...",
"permissions": [
"NAME",
"DEVICE_COARSE_LOCATION",
"DEVICE_PRECISE_LOCATION"
]
}
}
},
"contextOut": [...],
}

关于firebase - Actions on Google 以 "Sorry, I didn' 响应,但未得到任何响应。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46118354/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com