Dialogflow es 单击转盘项目后收到错误
我们有一个动作在生产中运行得很好。在尝试单击或调用旋转木马中的项目后,它刚刚开始返回错误 复制步骤如下所示Dialogflow es 单击转盘项目后收到错误,dialogflow-es,actions-on-google,Dialogflow Es,Actions On Google,我们有一个动作在生产中运行得很好。在尝试单击或调用旋转木马中的项目后,它刚刚开始返回错误 复制步骤如下所示 言行一致 Carosel负载良好 通过单击或语音调用旋转木马中的任何项目 收到错误 抱歉,{action}此时没有响应。请稍后再试 下面是如何构建它的一个片段 stackdriver日志中没有任何错误报告 /** * @description Build the Carousel * @private * @static * @param {CardListIt
/**
* @description Build the Carousel
* @private
* @static
* @param {CardListItem[]} listItems - Array of CardListItem to transform
* @returns {Carousel}
* Returns a Carousel
* @memberof TemplateBuilder
*/
private static getCarousel(listItems: CardListItem[]): Carousel {
const items = [] as GoogleActionsV2UiElementsCarouselSelectCarouselItem[];
listItems = this.sortListTemplateListItemsByGoogleIndexAscending(listItems);
for (const listItem of listItems) {
if (listItem.googleIndex) {
items.push(this.getCarouselItem(listItem));
}
}
return new Carousel({
items,
display: 'DEFAULT',
});
}
/**
* @description Build a CarouselItem
* @private
* @static
* @param {CardListItem} data - Template data of type ListTemplateData
* @returns {GoogleActionsV2UiElementsCarouselSelectCarouselItem}
* Returns a Carousel Item
* @memberof TemplateBuilder
*/
private static getCarouselItem(data: CardListItem): GoogleActionsV2UiElementsCarouselSelectCarouselItem {
const title = data.textContent ? this.convertToPlainText(data.textContent) : null;
const imageUrl = typeof data.image === 'string' ? data.image : data.image.imageUrl;
return {
optionInfo: {
key: data.intentHandler || data.token,
synonyms: [],
} as GoogleActionsV2OptionInfo,
image: new Image({
url: this.getImageURL(imageUrl),
alt: title,
height: null,
width: null,
}),
title,
} as GoogleActionsV2UiElementsCarouselSelectCarouselItem;
}
来自web钩子的响应
{
"payload": {
"google": {
"expectUserResponse": true,
"systemIntent": {
"intent": "actions.intent.OPTION",
"data": {
"@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
"carouselSelect": {
"items": [
{
"optionInfo": {
"key": "AccountBalanceIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-account.jpg",
"accessibilityText": "Account Balance",
"height": null,
"width": null
},
"title": "Account Balance"
},
{
"optionInfo": {
"key": "UsageCostIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-usage.jpg",
"accessibilityText": "Energy Usage",
"height": null,
"width": null
},
"title": "Energy Usage"
},
{
"optionInfo": {
"key": "BillAmountIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-bill.jpg",
"accessibilityText": "Bill History",
"height": null,
"width": null
},
"title": "Bill History"
},
{
"optionInfo": {
"key": "EnergyInsightsIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-insights.jpg",
"accessibilityText": "Energy Insights",
"height": null,
"width": null
},
"title": "Energy Insights"
},
{
"optionInfo": {
"key": "BillDueDateIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-bill-due-date.jpg",
"accessibilityText": "Bill Due Date",
"height": null,
"width": null
},
"title": "Bill Due Date"
},
{
"optionInfo": {
"key": "EnergyAlertIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-alert.jpg",
"accessibilityText": "Energy Alert",
"height": null,
"width": null
},
"title": "Energy Alert"
},
{
"optionInfo": {
"key": "EnergyTipIntent",
"synonyms": []
},
"image": {
"url": "https://aglvoiceprod.blob.core.windows.net/images/google/thumb-tip.jpg",
"accessibilityText": "Energy Tip",
"height": null,
"width": null
},
"title": "Energy Tip"
}
],
"imageDisplayOptions": "DEFAULT"
}
}
},
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "<speak>Hi Brent,<break time=\"200ms\"/> welcome to <say-as interpret-as=\"spell-out\">AGL</say-as>.<break time=\"400ms\"/> With our latest update,<break time=\"200ms\"/> you can now set up Energy Alerts.<break time=\"300ms\"/> For other ways that I can help,<break time=\"200ms\"/> say \"more information\".<break time=\"350ms\"/> How can I help you today?</speak>",
"displayText": "Hi Brent, welcome to AGL. With our latest update, you can now set up Energy Alerts. For other ways that I can help, say \"more information\". How can I help you today?"
}
}
],
"suggestions": [
{
"title": "Monthly Billing"
},
{
"title": "eBilling"
},
{
"title": "Payment Extension"
},
{
"title": "Feedback"
},
{
"title": "Help"
}
]
}
}
},
"outputContexts": [
{
"name": "projects/agl-prod-603de/agent/sessions/ABwppHESxXC8wRCVt2-hskWfsZwxEoH54G6jm_yTj2oIiETa1V3EbgRGj86H7Ys5bEKG0YrzkL0fE9Mpnhk/contexts/_actions_on_google",
"lifespanCount": 99,
"parameters": {
"data": "{\"sessionLaunched\":true,\"skippedIntents\":[],\"possibleIntents\":[],\"followUp\":{\"yes\":{\"data\":null,\"intent\":\"Unhandled\"},\"no\":{\"data\":null,\"intent\":\"Unhandled\"},\"fuelType\":{\"elec\":{\"data\":null,\"intent\":\"Unhandled\"},\"gas\":{\"data\":null,\"intent\":\"Unhandled\"},\"both\":{\"data\":null,\"intent\":\"Unhandled\"}},\"number\":{\"data\":null,\"intent\":\"Unhandled\",\"slotName\":null},\"period\":{\"data\":null,\"intent\":\"Unhandled\",\"slotName\":null}},\"lastIntent\":\"LaunchRequest\"}"
}
}
]
}
{
“有效载荷”:{
“谷歌”:{
“expectUserResponse”:正确,
“系统意图”:{
“意图”:“actions.intent.OPTION”,
“数据”:{
“@type”:“type.googleapis.com/google.actions.v2.OptionValueSpec”,
“旋转木马选择”:{
“项目”:[
{
“选项信息”:{
“键”:“AccountBalanceIntent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-account.jpg",
“accessibilityText”:“账户余额”,
“高度”:空,
“宽度”:空
},
“标题”:“账户余额”
},
{
“选项信息”:{
“密钥”:“UsageCostIntent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-usage.jpg",
“accessibilityText”:“能源使用”,
“高度”:空,
“宽度”:空
},
“标题”:“能源使用”
},
{
“选项信息”:{
“密钥”:“BillamountContent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-bill.jpg",
“accessibilityText”:“账单历史记录”,
“高度”:空,
“宽度”:空
},
“标题”:“账单历史记录”
},
{
“选项信息”:{
“密钥”:“EnergyInsightsIntent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-insights.jpg",
“accessibilityText”:“能源洞察”,
“高度”:空,
“宽度”:空
},
“标题”:“能源洞察”
},
{
“选项信息”:{
“密钥”:“BillDueDateIntent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-bill-due-date.jpg",
“accessibilityText”:“票据到期日”,
“高度”:空,
“宽度”:空
},
“标题”:“票据到期日”
},
{
“选项信息”:{
“密钥”:“能量内容”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-alert.jpg",
“accessibilityText”:“能量警报”,
“高度”:空,
“宽度”:空
},
“标题”:“能源警报”
},
{
“选项信息”:{
“密钥”:“EnergyTypintent”,
“同义词”:[]
},
“图像”:{
“url”:”https://aglvoiceprod.blob.core.windows.net/images/google/thumb-tip.jpg",
“accessibilityText”:“能源提示”,
“高度”:空,
“宽度”:空
},
“标题”:“能量提示”
}
],
“imageDisplayOptions”:“默认”
}
}
},
“richResponse”:{
“项目”:[
{
“简单响应”:{
“textToSpeech”:“嗨,布伦特,欢迎来到AGL。通过我们的最新更新,您现在可以设置能源警报。对于我可以提供帮助的其他方式,请说“更多信息”。今天我能为您提供什么帮助?”,
“displayText”:“嗨,布伦特,欢迎来到AGL。通过我们的最新更新,您现在可以设置能源警报。对于我可以提供帮助的其他方式,请说“更多信息”。今天我能为您提供什么帮助?”
}
}
],
“建议”:[
{
“标题”:“每月账单”
},
{
“标题”:“埃比林”
},
{
“标题”:“付款延期”
},
{
“标题”:“反馈”
},
{
“标题”:“帮助”
}
]
}
}
},
“输出上下文”:[
{
“名称”:“projects/agl-prod-603de/agent/sessions/ABWPPHESXC8WRCVT2-hskWfsZwxEoH54G6jm_yTj2oIiETa1V3EbgRGj86H7Ys5bEKG0YrzkL0fE9Mpnhk/Context/_google上的行动”,
“生命计数”:99,
“参数”:{
“数据”:“{”sessionLaunched\”:true,“skippedIntents\”:[],“可能内容”:[],“followUp\”:{”yes\“:{”data\”:null,“intent\”:“Unhandled\”,“no\”:{“data\”:null,“intent\”:“Unhandled\”,“fuelType\”:{“elec\”:{“data\”:“data\”:null”,“intent\”:“Unhandled\”,“gas\”:“:{intent\”,:“gas\”,:::{intent\”