Application configuration

Application configuration contains two parts

  1. Global application configuration, that is described in .dashaapp file
  2. Session configuration, that describes part of configuration related to dialogue instance

Global configuration

The global configuration is stored in the .dashaapp file and contains

Application name

Mandatory lowercase name of an application, required to identify your application

Dialogue configuration

Mandatory section, that describes where to find your conversational model

  • path to main DashaScript file with your conversational model
  • path to view file, that describes how to render your model in UI

NLG Section

Optional section, that describes where to find the configuration of NLG module of your dialogue

NLU Section

The optional section determines how an application understands natural language.

Properties

PropertyTypeDescription
skillsstring[]List of skills used by the application to extract meaning from natural language.
languagestringBCP 47 language tag denoting a target language (e. g. "en-US").
customIntentsCustomIntentsIncludeConfig?Definition of custom intents.
disabledIntentBySkillDisabledIntentBySkill?Specific intents disabled from concrete skills while processing message.
disabledDataFactBySkillDisabledDataFactBySkill?Specific data facts disabled from concrete skills while processing message.

Disabled intent by skill

Description of which intents should not be allocated from certain skills.

DisabledIntentBySkill - is a map of string representation of skill and array of string representation of intents which shoud not be extracted.

Disabled data fact by skill

Description of which data facts should not be allocated from certain skills.

DisabledDataFactBySkill - is a map of string representation of skill and array of string representation of data facts which shoud not be extracted.

Custom model include configuration

Configuration of custom model. Information required to customize the extraction of meaning from natural language text.

Properties

PropertyTypeDescription
filestringPath to the file containing custom intents and/or entities.

Example of .dashaapp file

{ "formatVersion": "2", "nlu": { "skills": [ "common_phrases", "common-parser", "sentiment" ], "customIntents": { "file": "data.json" }, "disabledIntentBySkill": { "common_phrases": [ "how_do_you_do" ] }, "language": "en-US" }, "nlg": { "type": "phrases", "file": "phrasemap.json" }, "dialogue": { "file": "main.dsl", "view": "view.json" }, "name": "appname", "description": "description" }

Connection system intents

  1. Select skills list, that contains intents selected in System intents document
  2. Add skills to nlu.skills list in .dashaapp file
  3. Start your application and enjoy NLU!

Connecting custom intents

  1. Create data.json file in one folder with your .dashaapp file

  2. Add custom intents and/or custom entities to data.json

  3. Add path to dataset file data.json to section nlu.customIntents in dashaapp file

    "customIntents": { "file": "data.json" }
  4. Start your application and enjoy NLU!

  5. Improve your model to achieve better results - Improving models

Example of dashaapp file (project.dashaapp):

{ "formatVersion": "2", "name": "cool-project", "description": "", "nlu": { "skills": [ "common_phrases", "sentiment" ], "language": "en-US", "customIntents": { "file": "data.json" } }, "nlg": { "type": "phrases", "file": "phrasemap.json", "signatureFile": "phrasemapSignature.json" }, "dialogue": { "file": "main.dsl", "view": "view.json" } }

Per-conversation configuration

Some options can be set on a per-conversation basis, as properties of the conversation object. Here is an example:

const conv = app.createConversation(); conv.audio.tts = "default"; conv.audio.stt = "default"; conv.audio.noiseVolume = 0.5; conv.audio.vadPauseDelay = 0.8; conv.sip.config = "default";

To choose whether a conversation should use text or audio communication, use the channel option of conv.execute().

// to start a text conversation await conv.execute({ channel: "text" }); // to start an audio conversation await conv.execute({ channel: "audio" });

Refer to the SDK docs for more info on audio and sip conversation options.

Found a mistake? Email us, and we'll send you a free t-shirt!

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.