Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google/chat-sdk-dialogflow

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google/chat-sdk-dialogflow

Add-on to @google/chat-sdk to delegate conversational chats to Dialogflow.

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

Dialogflow ES adapter for Google Chat bot toolkit

Handler that forwards messages to Dialogflow ES.

Note: This is not an official Google product.

See googleworkspace/chat-framework-nodejs for general instructions on building bots with the SDK.

Connecting Dialogflow ES to messages handlers

Use the dialogflowHandler method to create a message handler that forwards requests to Dialogflow ES. Creating the handler requires the Google project ID and a language code (automatic detection of language not yet implemented.)

// Respond to "@bot help"
import {dialogflowHandler} from "@google/chat-sdk-dialogflow";

bot.message(/help/, async (ctx) => {
  await ctx.reply({
    text: 'Here are some things you can try...'
  });
});

// Forwards all other messages to dialogflow
bot.message(
  dialogflowHandler({
    projectId: process.env.GOOGLE_PROJECT_ID,
    languageCode: 'en',
  })
);

Keywords

FAQs

Package last updated on 08 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc