"askrandomquestion"という関数を呼び出し、そこから質問をします。 サーバーのノードjsファイルから "askrandomquestion"を呼び出します(私はFireベースを使用しました)。
exports.appname = functions.https.onRequest((request, response) => {
const app = new App({ request, response });
console.log('Request headers: ' + JSON.stringify(request.headers));
console.log('Request body: ' + JSON.stringify(request.body));
// Greet the user and direct them to next turn
function unhandledDeepLinks (app) {
app.ask(`Welcome to Google car assistant `,
NO_INPUTS);
}
// Say a fact
function askrandomquestion (app) {
var randomnumber = Math.random() * (max - min) + min;
switch(randomnumber)
{
//do your logic here
}
};
私は質問がデータベースに保存され、意図/行動のように扱われないと思いますか? この機能の例を教えていただければ幸いです。 – soumaya
api.aiプロジェクトのWebhookを有効にしましたか? –
はい私はwebhookを有効にしました – soumaya