Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NLUAdapter

NLU adapter class, extended to connect bBot with NLU platform.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new NLUAdapter(bot: "/Volumes/x/code/amazebot/bbot/src/index"): NLUAdapter
  • Create an adapter instance. Adapter modules should provide a .use method that accepts the bot, to provide to their adapter class constructor, returning the instance.

    Parameters

    • bot: "/Volumes/x/code/amazebot/bbot/src/index"

      The current bBot instance

    Returns NLUAdapter

Properties

bot

bot: "/Volumes/x/code/amazebot/bbot/src/index"

The current bBot instance

name

name: string = "nlu-adapter"

Methods

parseSchema

  • parseSchema(internal: any, schema: object, external?: any): any
  • Utility to convert internal object to schema required in adapter platform. Passing the original internal object as the external, allows inheriting all attributes without needing to map the ones that are the same in both. Otherwise, result would only include values from defined schema fields.

    Parameters

    • internal: any
    • schema: object
      • [path: string]: string
    • Default value external: any = {}

    Returns any

Abstract process

  • process(message: TextMessage): Promise<bot.NaturalLanguageResultsRaw | undefined>

Abstract shutdown

  • shutdown(): Promise<void>

Abstract start

  • start(): Promise<void>

Generated using TypeDoc