Non-Potable Macchiato

    @bottender/dialogflow
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.5 • Public • Published

    @bottender/dialogflow

    Dialogflow integration for Bottender.

    Installation

    You can install it with npm:

    npm install @bottender/dialogflow

    or Yarn:

    yarn add @bottender/dialogflow

    Usage

    const { chain } = require('bottender');
    const dialogflow = require('@bottender/dialogflow');
    
    async function SayHello(context) {
      await context.sendText('Hello!');
    }
    
    async function Unknown(context) {
      await context.sendText('Sorry, I don’t know what you say.');
    }
    
    const Dialogflow = dialogflow({
      projectId: process.env.GOOGLE_APPLICATION_PROJECT_ID,
      actions: {
        greeting: SayHello,
      },
    });
    
    module.exports = async function App() {
      return chain([
        Dialogflow, //
        Unknown,
      ]);
    };

    Reference

    projectId

    The ID of your Dialogflow Project.

    Type: string. Required.

    languageCode

    The language of this conversational query. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.

    Type: string. Required.

    actions

    Actions to be executed when the event matches corresponding intent.

    Type: Record<string, Action>. Required.

    timeZone

    The time zone of this conversational query from the time zone database, e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used.

    Type: string. Optional.

    License

    MIT © Yoctol

    Install

    npm i @bottender/dialogflow

    DownloadsWeekly Downloads

    67

    Version

    1.5.5

    License

    MIT

    Unpacked Size

    11 kB

    Total Files

    7

    Last publish

    Collaborators

    • chentsulin
    • etrexkuo
    • tw0517tw
    • link515