GithubHelp home page GithubHelp logo

isabella232 / actions-builder-conversation-components-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from actions-on-google/actions-builder-conversation-components-nodejs

0.0 0.0 0.0 28 KB

Conversation Components sample (using Actions Builder) in Node.js

Home Page: https://developers.google.com/assistant/conversational/prompts

License: Apache License 2.0

JavaScript 49.34% TypeScript 50.66%

actions-builder-conversation-components-nodejs's Introduction

Actions on Google: Conversation Components Sample

Prerequisites

  1. Node.js and NPM
  2. Install the Firebase CLI
    • We recommend using MAJOR version 8 , npm install -g firebase-tools@^8.0.0
    • Run firebase login with your Google account

Setup

Actions Console

  1. From the Actions on Google Console, New project > Create project > under What kind of Action do you want to build? > Custom > Blank project

Actions CLI

  1. Install the Actions CLI
  2. Navigate to sdk/settings/settings.yaml, and replace <PROJECT_ID> with your project ID
  3. Run gactions login to login to your account.
  4. Run gactions push to push your project.
  5. Run gactions deploy preview to deploy your project.

Running this Sample

  • You can test your Action on any Google Assistant-enabled device on which the Assistant is signed into the same account used to create this project. Just say or type, “OK Google, talk to my test app”.
  • You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.

Running tests

This Action uses the Assistant conversation testing library for testing. Follow the steps below to run the tests for this project:

  1. Enable the Actions API for your project (The Actions API is enabled by default for newly created projects):
    1. Visit the Google API console and select your project from the Select a project dropdown.
    2. If the Action API is not enabled, search for "Actions API" and click Enable.
  2. Create a Service Account key:
    1. Visit the Google Cloud console credentials page and select your project from the Select a project dropdown.
    2. In the "Service Accounts" click on the "App Engine default service account" service account.
    3. Enter a service account name and click Create.
    4. From the Select a role dropdown, select Project > Owner.
    5. Click Continue.
    6. Click ADD KEY, then select Create new key, then press CREATE to download the service account JSON file.
  3. Rename the service account file to service_account.json, and place it in the root folder of the project.
  4. Enable Web and App Activity Controls for the service account. It is necessary to have this setting enabled in order to call the Actions API.
    • npm run enable-activity-controls
  5. Run tests
    • npm run test

References & Issues

Contributing

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.

actions-builder-conversation-components-nodejs's People

Contributors

fleker avatar taycaldwell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.