BotFrameworkConfig class

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

Extends

Constructors

BotFrameworkConfig()

Creates an instance of BotFrameworkConfig.

Properties

applicationId

Not used in DialogServiceConfig

properties

Provides access to custom properties.

speechRecognitionLanguage

Sets the speech recognition language.

Methods

close()

Dispose of associated resources.

fromAuthorizationToken(string, string)

Creates an instance of the bot framework config with the specified 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)

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

BotFrameworkConfig()

Creates an instance of BotFrameworkConfig.

new BotFrameworkConfig()

Property Details

applicationId

Not used in DialogServiceConfig

applicationId: string

Property Value

string

properties

Provides access to custom properties.

public properties: PropertyCollection

Property Value

speechRecognitionLanguage

Sets the speech recognition language.

public speechRecognitionLanguage: string

Property Value

string

Method Details

close()

Dispose of associated resources.

function close()

fromAuthorizationToken(string, string)

Creates an instance of the bot framework config with the specified 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(authorizationToken: string, region: string)

Parameters

authorizationToken
string

The authorization token associated with the bot

region
string

The region name (see the region page).

Returns

A new bot framework config.

fromSubscription(string, string)

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

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

Parameters

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