Я реализовал код, который работает нормально, но как только я начал добавлять код с addSugestions, происходит ошибка. Кто-нибудь здесь, пожалуйста, поделитесь своими знаниями с реализацией кода через index.js
'use strict';
//Import the Dialogflow module from the Actions on Google client library//
const {dialogflow} = require('actions-on-google');
//Import the firebase-functions package//
const functions = require('firebase-functions');
//Instantiate the Dialogflow client//
const app = dialogflow({debug: true});
//Handle the create_name intent//
app.intent('create_name', (conv, {name}) => {
//Construct the conversational response//
conv.ask('Nice to meet you ' + name + '. Would you like to hear a joke?');
});
app.intent('create_yes', (conv) => {
//Construct the conversational response//
//conv.ask('Nice to meet you. Would you like to hear a joke?').addSuggestions(['0', '42', '100', 'Never mind']);
conv.ask('Nice to meet you. Would you like to hear a joke?');
});
//Set the DialogflowApp object to handle the HTTPS POST request//
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);