Module: violet

This is the Core Violet Module - it returns the conversation engine that voice scripts can take advantage of.

Voice scripts can be grouped into a single app and multiple apps can be made available on a single server. Currently Violet supports registering intents for Amazon's Alexa Skills Kit and Google's Dialogflow platform.


(static) clearAppInfo(appName)

Violet intentionally groups scripts into an app. The method clears any previous script information for the specified app. This method is primarily used by the test suite as it uses the same app repeatedly.
Name Type Description
appName App name to reset script information.

(static) script(cfg) → {ConversationEngine}

Instantiates and returns the Violet Conversation Engine. Most violet scripts start by making this call.
Name Type Description
cfg Object script config
Name Type Description
appName (optional) Essentially a unique id for the script. Having a shared id between two scripts will mean that they add to the same ConversationEngine object. Not setting this parameter will mean that Violet will attach this script to the previous App. It is recommended to not set this parameter (in the script) but to define it in the parent where the script is being loaded.
invocationName (optional) Used when configuring skills by the Alexa platform and the web voice tooling
platforms Array.<Object> (optional) Voice Platforms to support. Each item in the array is expected to have keys called 'endpoint' and 'platform'. Not setting this parameter will mean that Violet will support both Alexa (at /alexa) and Google (at /google).
- The primary ConversationEngine object that Voice Apps will use to define scripts, intents, goals, etc.

(static) server()

Assists with the loading of scripts by a Server. Primarily enables apps to have multiple scripts.
Documentation generated by JSDoc 3.5.5 on Sat Mar 14 2020 19:55:45 GMT-0400 (EDT)