我试图在智能显示器上运行BrowseCarousel,但是我得到了以下错误
只有支持web浏览器的客户端才支持expected_inputs.input_prompt.rich_initial_prompt: MalformedResponse 'carousel_browse‘。
我的设备是Google集线器,它支持网络浏览器,并且在我的手机上使用相同的代码
conv.ask(fakeColorCarousel());
const fakeColorCarousel = () => {
const carousel = new BrowseCarousel({
items: {
'indigo taco': {
title: 'Indigo Taco',
synonyms: ['indigo', 'taco'],
image: new Image({
url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDN1JRbF9ZMHZsa1k/style-color-uiapplication-palette1.png',
alt: 'Indigo Taco Color',
}),
},
'pink unicorn': {
title: 'Pink Unicorn',
synonyms: ['pink', 'unicorn'],
image: new Image({
url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDbFVfTXpoaEE5Vzg/style-color-uiapplication-palette2.png',
alt: 'Pink Unicorn Color',
}),
},
'blue grey coffee': {
title: 'Blue Grey Coffee',
synonyms: ['blue', 'grey', 'coffee'],
image: new Image({
url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDZUdpeURtaTUwLUk/style-color-colorsystem-gray-secondary-161116.png',
alt: 'Blue Grey Coffee Color',
}),
},
}});
return carousel;
};发布于 2018-10-25 17:14:40
从技术上讲,智能显示器不支持谷歌的网页浏览功能。您应该检查设备上是否存在web浏览器,或者要求您的操作使用web浏览器。
const hasWebBrowser = conv.surface.capabilities.has('actions.capability.WEB_BROWSER');
阅读更多:表面能力指南
https://stackoverflow.com/questions/52991595
复制相似问题