BotFrameworkConfig class

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

Extends

DialogServiceConfigImpl

Constructors

BotFrameworkConfig()

Creates an instance of BotFrameworkConfig.

Properties

applicationId

Sets 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 a bot framework configuration instance for the specified authorization token and region. Note: The caller must ensure that an authorization token is valid. Before an authorization token expires, the caller must refresh it by setting the authorizationToken property on the corresponding DialogServiceConnector instance created with this config. The contents of configuration objects are copied when connectors are created, so setting authorizationToken on a DialogServiceConnector will not update the original configuration's authorization token. Create a new configuration instance or set the SpeechServiceAuthorization_Token property to update an existing instance if it will be used to create further DialogServiceConnectors.

fromEndpoint(URL, string)

Creates an instance of a BotFrameworkConfig. This method is intended only for users who use a non-standard service endpoint or parameters. Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs. Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the fromEndpoint method, and then set authorizationToken="token" on the created BotFrameworkConfig instance to use the authorization token. Note: Added in version 1.15.0.

fromHost(string | URL, string, string)

Creates an instance of a BotFrameworkConfig. This method is intended only for users who use a non-default service host. The standard resource path will be assumed. For services with a non-standard resource path or no path at all, use fromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: To use an authorization token with fromHost, use fromHost(URL) and then set the AuthorizationToken property on the created BotFrameworkConfig instance. Note: Added in version 1.15.0.

fromSubscription(string, string, string)

Creates a bot framework configuration instance with the provided subscription information.

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

BotFrameworkConfig()

Creates an instance of BotFrameworkConfig.

new BotFrameworkConfig()

Property Details

applicationId

Sets the corresponding backend application identifier.

void applicationId

Property Value

void

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 a bot framework configuration instance for the specified authorization token and region. Note: The caller must ensure that an authorization token is valid. Before an authorization token expires, the caller must refresh it by setting the authorizationToken property on the corresponding DialogServiceConnector instance created with this config. The contents of configuration objects are copied when connectors are created, so setting authorizationToken on a DialogServiceConnector will not update the original configuration's authorization token. Create a new configuration instance or set the SpeechServiceAuthorization_Token property to update an existing instance if it will be used to create further DialogServiceConnectors.

static function fromAuthorizationToken(authorizationToken: string, region: string, botId?: string): BotFrameworkConfig

Parameters

authorizationToken

string

The authorization token associated with the bot

region

string

The region name (see the region page).

botId

string

Optional. Identifier for using a specific bot within an Azure resource group. Equivalent to the resource name.

Returns

A new bot framework configuration instance.

fromEndpoint(URL, string)

Creates an instance of a BotFrameworkConfig. This method is intended only for users who use a non-standard service endpoint or parameters. Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs. Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the fromEndpoint method, and then set authorizationToken="token" on the created BotFrameworkConfig instance to use the authorization token. Note: Added in version 1.15.0.

static function fromEndpoint(endpoint: URL, subscriptionKey?: string): BotFrameworkConfig

Parameters

endpoint

URL

The service endpoint to connect to.

subscriptionKey

string

The subscription key. If a subscription key is not specified, an authorization token must be set.

Returns

  • A new bot framework configuration instance using the provided endpoint.

fromHost(string | URL, string, string)

Creates an instance of a BotFrameworkConfig. This method is intended only for users who use a non-default service host. The standard resource path will be assumed. For services with a non-standard resource path or no path at all, use fromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: To use an authorization token with fromHost, use fromHost(URL) and then set the AuthorizationToken property on the created BotFrameworkConfig instance. Note: Added in version 1.15.0.

static function fromHost(host: string | URL, subscriptionKey?: string, botId?: string): BotFrameworkConfig

Parameters

host

string | URL

If a URL is provided, the fully-qualified host with protocol (e.g. wss://your.host.com:1234) will be used. If a string is provided, it will be embedded in wss://{host}.convai.speech.azure.us.

subscriptionKey

string

The subscription key. If a subscription key is not specified, an authorization token must be set.

botId

string

Optional. Identifier for using a specific bot within an Azure resource group. Equivalent to the resource name.

Returns

A new bot framework configuration instance.

fromSubscription(string, string, string)

Creates a bot framework configuration instance with the provided subscription information.

static function fromSubscription(subscription: string, region: string, botId?: string): BotFrameworkConfig

Parameters

subscription

string

Subscription key associated with the bot

region

string

The region name (see the region page).

botId

string

Optional. Identifier for using a specific bot within an Azure resource group. Equivalent to the resource name.

Returns

A new bot framework configuration instance.

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