Dialogflow 响应:Google 上的操作
Dialog Flow Response : Actions On Google
您好,我正在发送来自 DialogFlow 的回复,其中包含丰富的回复。这个丰富的响应包含轮播,但我只看到简单的响应。我在 GA 中没有看到轮播响应。我的响应有什么缺陷吗?我在控制台操作模拟器中没有看到任何错误..
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Please follow these steps:",
"displayText": "Please follow these steps:"
},
"Carousel": {
"items": [
{
"title": "Step 1/6",
"description": "hello",
"image": {
"url": "https://www.xx",
"accessibilityText": "hello"
}
},
{
"title": "Step 2/6",
"description": "hello",
"image": {
"url": "https://www.xx",
"accessibilityText": "hello"
}
},
]
}
}
],
"suggestions": []
}
}
}
}
如果您直接发回 JSON,Carousel 和 List 对象不是 richResponse
属性 的一部分。相反,它们在 systemIntent
属性.
的子项中指定
整个响应可能看起来像这样
{
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Choose a item"
}
}
]
},
"systemIntent": {
"intent": "actions.intent.OPTION",
"data": {
"@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
"carouselSelect": {
"items": [
{
"optionInfo": {
"key": "first title"
},
"description": "first description",
"image": {
"url": "https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png",
"accessibilityText": "first alt"
},
"title": "first title"
},
{
"optionInfo": {
"key": "second"
},
"description": "second description",
"image": {
"url": "https://lh3.googleusercontent.com/Nu3a6F80WfixUqf_ec_vgXy_c0-0r4VLJRXjVFF_X_CIilEu8B9fT35qyTEj_PEsKw",
"accessibilityText": "second alt"
},
"title": "second title"
}
]
}
}
}
}
}
}
您好,我正在发送来自 DialogFlow 的回复,其中包含丰富的回复。这个丰富的响应包含轮播,但我只看到简单的响应。我在 GA 中没有看到轮播响应。我的响应有什么缺陷吗?我在控制台操作模拟器中没有看到任何错误..
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Please follow these steps:",
"displayText": "Please follow these steps:"
},
"Carousel": {
"items": [
{
"title": "Step 1/6",
"description": "hello",
"image": {
"url": "https://www.xx",
"accessibilityText": "hello"
}
},
{
"title": "Step 2/6",
"description": "hello",
"image": {
"url": "https://www.xx",
"accessibilityText": "hello"
}
},
]
}
}
],
"suggestions": []
}
}
}
}
如果您直接发回 JSON,Carousel 和 List 对象不是 richResponse
属性 的一部分。相反,它们在 systemIntent
属性.
整个响应可能看起来像这样
{
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Choose a item"
}
}
]
},
"systemIntent": {
"intent": "actions.intent.OPTION",
"data": {
"@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
"carouselSelect": {
"items": [
{
"optionInfo": {
"key": "first title"
},
"description": "first description",
"image": {
"url": "https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png",
"accessibilityText": "first alt"
},
"title": "first title"
},
{
"optionInfo": {
"key": "second"
},
"description": "second description",
"image": {
"url": "https://lh3.googleusercontent.com/Nu3a6F80WfixUqf_ec_vgXy_c0-0r4VLJRXjVFF_X_CIilEu8B9fT35qyTEj_PEsKw",
"accessibilityText": "second alt"
},
"title": "second title"
}
]
}
}
}
}
}
}