我目前有一个应用程序运行在谷歌上的行动使用API.AI。我已经修改了所有的回应成员为camelCase的建议,并得到了它的工作。现在我正在尝试退还一张基本卡,但我想不出如何正确退还它。
有没有人有最基本的JSON响应,向Google助手返回一张基本的卡片?
目前,我能得到的最基本的v2接口响应如下:
{
speech: "",
displayText: "",
data: {
google: {
expectUserResponse: true,
isSsml: true,
permissionsRequest: null
}
},
contextOut: [ ],
source: "webhook"
}发布于 2017-05-26 15:25:50
我介绍了一些JSON响应here的要点。
目前,它包括列表,基本卡和旋转木马,但我希望很快添加交易。希望能有所帮助
发布于 2017-05-26 14:33:52
这就是我使用的语音Tic Tac Toe
"google": {
"expect_user_response": true,
"rich_response": {
"items": [
{
"simple_response": {
"text_to_speech": "Your move was top. I moved left"
}
},
{
"basic_card": {
"image": {
"url": "https://server/010200000.png",
"accessibility_text": "Tic Tac Toe game board"
}
}
}
]
}
}我运行了有关google操作的事实,并查看了fulfillment输出,以了解如何做到这一点。
https://github.com/actions-on-google/apiai-facts-about-google-nodejs
发布于 2017-05-26 18:40:41
请注意,所有响应必须至少包含一个且不超过两个simple_response项。
https://stackoverflow.com/questions/44188687
复制相似问题