botium-connector-nuance

1.0.0 • Public • Published

Botium Connector for Nuance

NPM

npm version license

This is a Botium connector for testing your Nuance chatbot.

Did you read the Botium in a Nutshell articles ? Be warned, without prior knowledge of Botium you won't be able to properly use this library!

How it works?

Botium uses the Nuance API to connect to your chatbot.

It can be used as any other Botium connector with all Botium Stack components:

Requirements

  • Node.js and NPM
  • a deployed Nuance chatbot
  • a project directory on your workstation to hold test cases and Botium configuration

Install Botium and Nuance Webhook Connector

When using Botium CLI:

> npm install -g botium-cli
> npm install -g botium-connector-nuance
> botium-cli init
> botium-cli run

When using Botium Bindings:

> npm install -g botium-bindings
> npm install -g botium-connector-nuance
> botium-bindings init mocha
> npm install && npm run mocha

When using Botium Box:

Already integrated into Botium Box, no setup required

Connecting your Nuance chatbot to Botium

  1. Fill the mandatory capabilities of botium.json file:
    1. NUANCE_CLIENT_ID
    2. NUANCE_CLIENT_SECRET
    3. NUANCE_CONTEXT_TAG
    4. NUANCE_CHANNEL
  2. Nlp analytics (It slows down the communication, so it is not enabled as default):
    1. Enable it with NUANCE_NLP_ANALYTICS_ENABLE capability
  3. In order to use downloader/uploader:
    1. Generate service account
    2. If it is not visible to you, then please ask nuance for permissions
    3. Setup the following capabilities:
      1. NUANCE_API_URL
      2. NUANCE_ADMIN_CLIENT_ID
      3. NUANCE_ADMIN_CLIENT_SECRET
      4. NUANCE_PROJECT_ID

Sample botium.json in your working directory:

{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "<whatever>",
      "CONTAINERMODE": "nuance",
      "NUANCE_CLIENT_ID": "...",
      "NUANCE_OAUTH_URL": "...",
      "NUANCE_CLIENT_SECRET": "...",
      "NUANCE_CONTEXT_TAG": "...",
      "NUANCE_CHANNEL": "...",
      "NUANCE_NLP_ANALYTICS_ENABLE": true,
      "NUANCE_API_URL": "...",
      "NUANCE_ADMIN_CLIENT_ID": "...",
      "NUANCE_ADMIN_CLIENT_SECRET": "...",
      "NUANCE_PROJECT_ID": "..."
    }
  }
}

Botium setup is ready, you can begin to write your BotiumScript files.

Supported Capabilities

Set the capability CONTAINERMODE to nuance to activate this connector.

NUANCE_CLIENT_ID, NUANCE_CLIENT_SECRET

Nuance client id, and client secret

NUANCE_CONTEXT_TAG

Nuance context tag

NUANCE_CHANNEL

Nuance channel

NUANCE_LANGUAGE

Language of the chatbot. A chatbot can be multi lingual, but the communication is bound to one dedicated one.

Optional.

Default: en-US

NUANCE_NLP_ANALYTICS_ENABLE

Capability to enable nlp analytics.

Optional.

Default: false

NUANCE_API_URL

Nuance API url

Optional. Only required for downloader/uploader. Default: https://mix.api.nuance.com/

NUANCE_ADMIN_CLIENT_ID, NUANCE_ADMIN_CLIENT_SECRET

Credentials for Nuance Service Account

Optional. Only required for downloader/uploader.

NUANCE_PROJECT_ID

The Nuance Project ID.

Optional. Only required for downloader/uploader.

NUANCE_OAUTH_URL

Nuance Oauth url

Default: https://auth.crt.nuance.com/oauth2/token

NUANCE_DLG_ENDPOINT

Nuance NLU gRPC endpoint

Default: nlu.api.nuance.com:443

NUANCE_NLU_ENDPOINT

Nuance NLU gRPC endpoint

Default: dlg.api.nuance.com:443

NUANCE_OAUTH_MAX_RETRIES

Oauth max retries. It is to deal with for Nuance Authorization rate limit: 50 requests/minute per IP address

Default: 6

NUANCE_OAUTH_RETRY_DELAY_SEC

Oauth retry delay in sec. It is to deal with for Nuance Authorization rate limit: 50 requests/minute per IP address

Default: 10

NUANCE_LIBRARY

Nuance Library.

Default: default

NUANCE_SESSION_ID

Nuance session timeout in sec.

Default: not set (generated by Nuance)

NUANCE_SESSION_TIMEOUT_SEC

Nuance session timeout in sec.

Default: 900

NUANCE_USER_ID

Nuance user id in sec.

Default: not set

NUANCE_CLIENT_DATA

Client data to inject into the Nuance Event Logs

NUANCE_SUPPRESS_LOG_USER_DATA

Capability to turn off Nuance Event Logs

NUANCE_INITIAL_CONTEXT

Initial context (session data) in JSON format

NUANCE_SKIP_WELCOME_MESSAGE

Turning off welcome message check can speed up the time of the conversation.

Default: false

NUANCE_NLU_ENTITY_VALUE_MODE

Configure how Nuance entities are mapped to Botium entities

Possible values:

  • FORCE_LITERAL Nuance entities are mapped as string
  • FORCE_STRUCT Nuance entities are mapped as string
  • LITERAL_FOR_COMPLEX Flat Nuance entities are mapped as string, complex as JSON

Open Issues and Restrictions

  • Voice, and IVR chatbots are not supported (just text based)
  • On premise installation of a Nuance chatbot might not work.
  • Transfer action is not supported:
  • Dialog events are not supported
  • Continue actions are not supported

Readme

Keywords

none

Package Sidebar

Install

npm i botium-connector-nuance

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

563 kB

Total Files

55

Last publish

Collaborators

  • ftreml