All Projects → actions-on-google → assistant-conversation-nodejs

actions-on-google / assistant-conversation-nodejs

Licence: Apache-2.0 license
A developer friendly way to fulfill Actions SDK handlers for the Google Assistant

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to assistant-conversation-nodejs

fulfillment-actions-library-nodejs
Integrating Actions on Google Client Library with Dialogflow's Fulfillment Library
Stars: ✭ 28 (-65.85%)
Mutual labels:  actions-on-google
fulfillment-webhook-nodejs
Default Fulfillment code in Dialogflow's Inline Editor
Stars: ✭ 188 (+129.27%)
Mutual labels:  actions-on-google
local-home-sdk
Local Home SDK
Stars: ✭ 65 (-20.73%)
Mutual labels:  actions-on-google
actions-tools
This provides you some useful tools to build your actions for Google Assistant.
Stars: ✭ 13 (-84.15%)
Mutual labels:  actions-on-google
fulfillment-temperature-converter-nodejs
Sample demonstrating how to make a Dialogflow agent compatible with 9 platforms
Stars: ✭ 16 (-80.49%)
Mutual labels:  actions-on-google
fulfillment-firestore-nodejs
Integrating Firebase's Firestore database with Dialogflow
Stars: ✭ 79 (-3.66%)
Mutual labels:  actions-on-google
fulfillment-slot-filling-nodejs
Slot Filling with Dialogflow Fulfillment
Stars: ✭ 16 (-80.49%)
Mutual labels:  actions-on-google

Actions SDK Node.js Fulfillment Library

This fulfillment library exposes a developer friendly way to fulfill Actions SDK handlers for the Google Assistant.

NPM Version Build Status

Setup Instructions

Make sure Node.js >=10.18.0 is installed.

Install the library with either npm install @assistant/conversation or yarn add @assistant/conversation if you use yarn.

Example Usage

// Import the appropriate service and chosen wrappers
const {
  conversation,
  Image,
} = require('@assistant/conversation')

// Create an app instance
const app = conversation()

// Register handlers for Actions SDK

app.handle('<YOUR HANDLER NAME>', conv => {
  conv.add('Hi, how is it going?')
  conv.add(new Image({
    url: 'https://developers.google.com/web/fundamentals/accessibility/semantics-builtin/imgs/160204193356-01-cat-500.jpg',
    alt: 'A cat',
  }))
})

Frameworks

Export or run for your appropriate framework:

Firebase Functions

const functions = require('firebase-functions')

// ... app code here

exports.fulfillment = functions.https.onRequest(app)

Actions Console Inline Editor

const functions = require('firebase-functions')

// ... app code here

// name has to be `ActionsOnGoogleFulfillment`
exports.ActionsOnGoogleFulfillment = functions.https.onRequest(app)

Self Hosted Express Server

const express = require('express')
const bodyParser = require('body-parser')

// ... app code here

const expressApp = express().use(bodyParser.json())

expressApp.post('/fulfillment', app)

expressApp.listen(3000)

AWS Lambda API Gateway HTTP proxy integration

// ... app code here

exports.fulfillment = app

Next Steps

Take a look at the docs and samples linked at the top to get to know the platform and supported functionalities.

Library Development Instructions

This library uses yarn to run commands. Install yarn using instructions from https://yarnpkg.com/en/docs/install or with npm: npm i -g yarn.

Install the library dependencies with yarn. If you want to run any of the sample apps, follow the instructions in the sample README.

Functionality

Public interfaces, classes, functions, objects, and properties are labeled with the JSDoc @public tag and exported at the top level. Everything that is not labeled @public and exported at the top level is considered internal and may be changed.

References & Issues

Make Contributions

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

License

See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].