您好我在index.js中使用以下代码。在这里,我想在“默认欢迎意图”中设置一个值,我想接受“测试意图”。这该怎么做。我想在后台传递这个值,我想用它
"use strict";
exports.__esModule = true;
var functions = require("firebase-functions");
var gApp = require("actions-on-google");
var WebhookClient = require('dialogflow-fulfillment').WebhookClient;
var _a = require('dialogflow-fulfillment'), Card = _a.Card, Suggestion = _a.Suggestion;
var app = gApp.dialogflow({ debug: true });
process.env.DEBUG = 'dialogflow:debug';
//exports.dialogflowSample = functions.https.onRequest((request, response) =>
//{
app.intent('Default Welcome Intent', function (conv, input) {
conv.ask("Welcome to my dialogFlow agent!");
});
app.intent('Test Intent', function (conv, input) {
conv.ask('<speak>Testing the application' + ("<say-as >" + input + "</say-as></speak>"));
conv.ask('<speak>Testing the application' + "<say-as >" + qNo + "</say-as></speak>");
});
exports.dialogflowSample = functions.https.onRequest(app);
//});