Я добавил несколько элементов в ответ списка, чтобы пользователь мог выбрать элемент из списка
сценарий
bot: hello what you want to update (list will open with options as{title, objective, place})
user: title {selects either by clicking or typing}
bot: Enter your title (webhook response)
user: xyz
bot: record updated
but the issue is when user clicks on any item it gives me an error
"Извините, тестовые приложения не отвечают прямо сейчас. Пожалуйста, попробуйте еще раз в ближайшее время."
и причина этой ошибки
MalformedResponse Не удалось проанализировать Ответ диалога в AppResponse: Индекс: 0.
это мой код
app.intent(CREATE_INTENT, (conv) => {
conv.ask("Here's the list");
conv.ask(new List({
title: "Select an option to update",
items: {
'SELECTION_KEY_TITLE': {
synonyms: [
'Title',
'title',
],
title: 'title',
description: 'Click here to update title',
image: new Image({
url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png', alt: 'Image alternate text',
}),
},
'SELECTION_KEY_PLACE': {
synonyms: [
'place',
'Place',
],
title: 'place',
description: 'This is for updating your city name',
image: new Image({
url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png', alt: 'Google Home',
}),
},
'SELECTION_KEY_OBJECTIVE': {
synonyms: [
'objective',
'Objective',
],
title: 'objective',
description: 'select to update objective',
image: new Image({
url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png', alt: 'Google Pixel',
}),
},
},
}));
app.intent(TITLE_INTENT, (conv, option) => {
if (option === SELECTION_KEY_TITLE) {
conv.ask("Please enter your resume title");
} else if (option === SELECTION_KEY_PLACE) {
conv.ask("What's your current city?");
} else if (option === SELECTION_KEY_OBJECTIVE) {
conv.ask("Please enter your objective");
} else {
conv.ask('Sorry! please select one option to update.');
conv.ask(new Suggestions(['Title', 'Place', 'Objective']));
}
});