CustomCommandsConfig class

Class that defines configurations for the dialog service connector object for using a CustomCommands backend.

Extends

Constructors

CustomCommandsConfig()

Creates an instance of CustomCommandsConfig.

Properties

applicationId

Sets the corresponding backend application identifier. Gets the corresponding backend application identifier.

DialogTypes
outputFormat
properties

Provides access to custom properties.

speechRecognitionLanguage

Gets the speech recognition language. Sets the speech recognition language.

Methods

close()

Dispose of associated resources.

fromAuthorizationToken(string, string, string)

Creates an instance of the bot framework config with the specified Speech Commands application id, authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.

fromSubscription(string, string, string)

Creates an instance of the bot framework config with the specified subscription and region.

getProperty(string | PropertyId, string)

Sets a named property as value

setProperty(string | PropertyId, string)

Sets a named property as value

setProxy(string, number, string, string)

Sets the proxy configuration. Only relevant in Node.js environments. Added in version 1.4.0.

setServiceProperty(string, string, ServicePropertyChannel)

Constructor Details

CustomCommandsConfig()

Creates an instance of CustomCommandsConfig.

new CustomCommandsConfig()

Property Details

applicationId

Sets the corresponding backend application identifier. Gets the corresponding backend application identifier.

string applicationId

Property Value

string

DialogTypes

static DialogTypes: any

Property Value

any

outputFormat

OutputFormat outputFormat

Property Value

properties

Provides access to custom properties.

PropertyCollection properties

Property Value

The properties.

speechRecognitionLanguage

Gets the speech recognition language. Sets the speech recognition language.

string speechRecognitionLanguage

Property Value

string

Method Details

close()

Dispose of associated resources.

function close()

fromAuthorizationToken(string, string, string)

Creates an instance of the bot framework config with the specified Speech Commands application id, authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.

static function fromAuthorizationToken(applicationId: string, authorizationToken: string, region: string)

Parameters

applicationId

string

Speech Commands application id.

authorizationToken

string

The authorization token associated with the application.

region

string

The region name (see the region page).

Returns

A new speech commands config.

fromSubscription(string, string, string)

Creates an instance of the bot framework config with the specified subscription and region.

static function fromSubscription(applicationId: string, subscription: string, region: string)

Parameters

applicationId

string

Speech Commands application id.

subscription

string

Subscription key associated with the bot

region

string

The region name (see the region page).

Returns

A new bot framework config.

getProperty(string | PropertyId, string)

Sets a named property as value

function getProperty(name: string | PropertyId, def?: string)

Parameters

name

string | PropertyId

The property to get.

def

string

The default value to return in case the property is not known.

Returns

string

The current value, or provided default, of the given property.

setProperty(string | PropertyId, string)

Sets a named property as value

function setProperty(name: string | PropertyId, value: string)

Parameters

name

string | PropertyId

The property to set.

value

string

The value.

setProxy(string, number, string, string)

Sets the proxy configuration. Only relevant in Node.js environments. Added in version 1.4.0.

function setProxy(proxyHostName: string, proxyPort: number, proxyUserName?: string, proxyPassword?: string)

Parameters

proxyHostName

string

The host name of the proxy server, without the protocol scheme (http://)

proxyPort

number

The port number of the proxy server.

proxyUserName

string

The user name of the proxy server.

proxyPassword

string

The password of the proxy server.

setServiceProperty(string, string, ServicePropertyChannel)

function setServiceProperty(name: string, value: string, channel: ServicePropertyChannel)

Parameters

name

string

value

string