How to use the actions-on-google.ActionsSdkAssistant function in actions-on-google

To help you get started, we’ve selected a few actions-on-google examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github firebase / functions-samples / assistant-say-number / functions / index.js View on Github external
exports.sayNumber = functions.https.onRequest((req, res) => {
  const assistant = new ActionsSdkAssistant({request: req, response: res});

  // List of re-prompts that are used when we did not understand a number from the user.
  const reprompts = [
    'I didn\'t hear a number',
    'If you\'re still there, what\'s the number?',
    'What is the number?'
  ];

  const actionMap = new Map();

  actionMap.set(assistant.StandardIntents.MAIN, assistant => {
    const inputPrompt = assistant.buildInputPrompt(true, `
        Hi! 
        I can read out an ordinal number like 123.
        Say a number.
      `, reprompts
github sfeir-open-source / google-actions-server / dist / index.js View on Github external
this.app.post('/', function (request, response) {
                _this3.assistant = new _actionsOnGoogle.ActionsSdkAssistant({ request: request, response: response });
                _this3.assistant.handleRequest(_this3.actionsMap);
            });
        }
github broidHQ / integrations / broid-google-assistant / lib / core / Adapter.js View on Github external
router.post('/', (req, res) => {
            this.assistant = new actionsSdk.ActionsSdkAssistant({ request: req, response: res });
            this.assistant.handleRequest(this.actionsMap);
            res.sendStatus(200);
        });
        return router;
github sfeir-open-source / google-actions-server / lib / index.js View on Github external
this.app.post('/', (request, response) => {
            this.assistant = new ActionsSdkAssistant({ request, response });
            this.assistant.handleRequest(this.actionsMap);
        });
    }
github broidHQ / integrations / broid-google-assistant / lib / core / webHookServer.js View on Github external
router.post("/", (req, res) => {
            this.assistant = new actionsSdk
                .ActionsSdkAssistant({ request: req, response: res });
            this.assistant.handleRequest(this.actionsMap);
        });
        this.express.use("/", router);
github broidHQ / integrations / broid-google-assistant / src / core / Adapter.ts View on Github external
router.post('/', (req, res) => {
      this.assistant = new actionsSdk.ActionsSdkAssistant({request: req, response: res});
      this.assistant.handleRequest(this.actionsMap);
      res.sendStatus(200);
    });