我正在为Google创建动作演示 运行以下命令时:
./gactions --verbose test --action_package action.json --project chatbot-36b55
我收到以下错误:
Checking for updates...
Successfully fetched update metadata
Finished checking for updates -- no updates available
Pushing the app for the Assistant for testing...
POST /v2/users/me/previews/chatbot-36b55:updateFromAgentDraft?updateMask=previewActionPackage.actionPackage.actions%2Cpre
viewActionPackage.actionPackage.conversations%2CpreviewActionPackage.actionPackage.types%2CpreviewActionPackage.startTime
stamp%2CpreviewActionPackage.endTimestamp HTTP/1.1
Host: actions.googleapis.com
User-Agent: Gactions-CLI/2.0.7 (linux; amd64; stable/6f4c996f8ee63dc5760c7728f674abe37bfe5fc4)
Content-Length: 329
Content-Type: application/json
Accept-Encoding: gzip
{"name":"users/me/previews/chatbot-36b55","previewActionPackage":{"actionPackage":{"actions":[{"fulfillment":{"conversati
onName":"HelloWorld"},"intent":{"name":"actions.intent.MAIN"},"name":"MAIN"}],"conversations":{"HelloWorld":{"name":"Hell
oWorld","url":"http://35.189.xx.xx/"}}},"name":"users/me/previews/chatbot-36b55"}}
Reading credentials from: creds.data
ERROR: Failed to test the app for the Assistant
ERROR: Request contains an invalid argument.
Field Violations:
# Field Description
1 URL is invalid 'http://35.189.xx.xx/'
2017/07/20 14:42:50 Server did not return HTTP 200
我只是按照the steps创建了操作包。 这是我的actions.json文件:
{
"actions": [
{
"name": "MAIN",
"fulfillment": {
"conversationName": "HelloWorld"
},
"intent": {
"name": "actions.intent.MAIN"
}
}
],
"conversations": {
"HelloWorld": {
"name": "HelloWorld",
"url": "http://35.189.xx.xx/"
}
}
}
我是否需要设置https来测试?如果这是问题,任何人都知道如何绕过它吗?
答案 0 :(得分:0)
https://developers.google.com/actions/reference/rest/Shared.Types/ConversationFulfillment州的url
参数文档:
对话的HTTPS端点(不支持HTTP)。
此外,必须可以从公共互联网访问该URL(您没有显示完整的IP地址,这是有充分理由的,所以我无法判断这是否属实)。
无论哪种方式,您都可以使用ngrok之类的东西创建HTTPS端点并保护到35.189.x.x主机的隧道。这将为您提供公共DNS条目和HTTPS端点。有关将ngrok与Actions配合使用的详细信息,另请参阅https://developers.google.com/actions/tools/ngrok。