К сожалению, эту проблему нельзя исправить одним диалогом. Чтобы решить эту проблему, вы должны создать ответ карты через выполнение. Свойство 'display' : 'CROPPED'
. заботится об изменении размера изображения. Для этого вы можете использовать встроенный редактор. Я добавил образец кода, который можно использовать во встроенном редакторе.
Для получения дополнительной информации проверьте документацию от Google: https://developers.google.com/assistant/conversational/df-asdk/rich-responses#BasicCardSamples
function cardFunction(agent) {
let conv = agent.conv();
conv.ask(new BasicCard({
text: `This is a basic card. Text in a basic card can include "quotes" and
most other unicode characters including emojis. Basic cards also support
some markdown formatting like *emphasis* or _italics_, **strong** or
__bold__, and ***bold itallic*** or ___strong emphasis___ as well as other
things like line \nbreaks`, // Note the two spaces before '\n' required for
// a line break to be rendered in the card.
subtitle: 'This is a subtitle',
title: 'Title: this is a title',
buttons: new Button({
title: 'This is a button',
url: 'https://assistant.google.com/',
}),
image: new Image({
url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',
alt: 'Image alternate text',
}),
display: 'CROPPED',
}));
agent.add(conv)
}