CustomCommandsConfig class

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

Extends

DialogServiceConfigImpl

Constructors

CustomCommandsConfig()

Creates an instance of CustomCommandsConfig.

Properties

applicationId

Gets the corresponding backend application identifier.

DialogTypes
outputFormat
properties

Provides access to custom properties.

speechRecognitionLanguage

Gets the speech recognition language.

Methods

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.

Inherited Methods

close()

Dispose of associated resources.

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, UriQueryParameter)

Constructor Details

CustomCommandsConfig()

Creates an instance of CustomCommandsConfig.

new CustomCommandsConfig()

Property Details

applicationId

Gets the corresponding backend application identifier.

string applicationId

Property Value

string

DialogTypes

static { BotFramework: string, CustomCommands: string } DialogTypes

Property Value

{ BotFramework: string, CustomCommands: string }

outputFormat

OutputFormat outputFormat

Property Value

properties

Provides access to custom properties.

PropertyCollection properties

Property Value

The properties.

speechRecognitionLanguage

Gets the speech recognition language.

string speechRecognitionLanguage

Property Value

string

Method Details

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): CustomCommandsConfig

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): CustomCommandsConfig

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.

Inherited Method Details

close()

Dispose of associated resources.

function close()

Inherited From DialogServiceConfigImpl.close

getProperty(string | PropertyId, string)

Sets a named property as value

function getProperty(name: string | PropertyId, def?: string): 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.

Inherited From DialogServiceConfigImpl.getProperty

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.

Inherited From DialogServiceConfigImpl.setProperty

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.

Inherited From DialogServiceConfigImpl.setProxy

setServiceProperty(string, string, UriQueryParameter)

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

Parameters

name

string

value

string

Inherited From DialogServiceConfigImpl.setServiceProperty