Google 上的操作中的 table 响应中未显示图像
Image not displaying in table response in actions on Google
conv.ask(new Table({
title: 'Emissions due to different gases',
// subtitle: 'Table Subtitle',
image: new Image({
uri: 'https://www.scienceabc.com/wp-content/uploads/2015/05/Walking-in-Rain.jpg',
alt: 'Emissions Image'
}),
columns: [
{
header: 'CO2',
align: 'CENTER',
},
{
header: 'CH4',
align: 'CENTER',
},
{
header: 'N20',
align: 'CENTER',
},
],
rows: [
// {
// cells: [carbonEmission, methaneEmission, nitrousEmission],
// dividerAfter: true,
// },
{
cells: ['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
dividerAfter: true,
},
{
cells: ['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
},
],
buttons: new Button({
title: 'Read More',
url: 'https://assistant.google.com'
}),
我已经添加了这段代码,我可以看到带有给定字段的 table,但是图像没有出现在 table 中,相反,即使图像是 https URL.
MalformedResponse
expected_inputs[0].input_prompt.rich_initial_prompt.items[1].table_card.image: the protocol must be http or https.
我认为问题在于 Image
class 中的 属性 可能应该称为 url
and not uri
.
conv.ask(new Table({
title: 'Emissions due to different gases',
// subtitle: 'Table Subtitle',
image: new Image({
uri: 'https://www.scienceabc.com/wp-content/uploads/2015/05/Walking-in-Rain.jpg',
alt: 'Emissions Image'
}),
columns: [
{
header: 'CO2',
align: 'CENTER',
},
{
header: 'CH4',
align: 'CENTER',
},
{
header: 'N20',
align: 'CENTER',
},
],
rows: [
// {
// cells: [carbonEmission, methaneEmission, nitrousEmission],
// dividerAfter: true,
// },
{
cells: ['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
dividerAfter: true,
},
{
cells: ['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
},
],
buttons: new Button({
title: 'Read More',
url: 'https://assistant.google.com'
}),
我已经添加了这段代码,我可以看到带有给定字段的 table,但是图像没有出现在 table 中,相反,即使图像是 https URL.
MalformedResponse
expected_inputs[0].input_prompt.rich_initial_prompt.items[1].table_card.image: the protocol must be http or https.
我认为问题在于 Image
class 中的 属性 可能应该称为 url
and not uri
.