你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CustomCommandsConfig class

定义用于使用 CustomCommands 后端的对话框服务连接器对象的配置的类。

扩展

DialogServiceConfigImpl

构造函数

CustomCommandsConfig()

创建 CustomCommandsConfig 的实例。

属性

applicationId

获取相应的后端应用程序标识符。

DialogTypes
outputFormat
properties

提供对自定义属性的访问权限。

speechRecognitionLanguage

获取语音识别语言。

方法

fromAuthorizationToken(string, string, string)

使用指定的语音命令应用程序 ID、授权令牌和区域创建机器人框架配置的实例。 注意:调用方需要确保授权令牌有效。 在授权令牌过期之前,调用方需要使用新的有效令牌调用此 setter 来刷新它。 创建新识别器时复制配置值时,新令牌值将不适用于已创建的识别器。 对于以前创建的识别器,需要设置相应识别器的授权令牌以刷新令牌。 否则,识别器会在识别过程中遇到错误。

fromSubscription(string, string, string)

使用指定的订阅和区域创建机器人框架配置的实例。

继承的方法

close()

释放关联的资源。

getProperty(string | PropertyId, string)

将命名属性设置为值

setProperty(string | PropertyId, string)

将命名属性设置为值

setProxy(string, number, string, string)

设置代理配置。 仅在 Node.js 环境中相关。 在版本 1.4.0 中添加。

setServiceProperty(string, string, UriQueryParameter)

构造函数详细信息

CustomCommandsConfig()

创建 CustomCommandsConfig 的实例。

new CustomCommandsConfig()

属性详细信息

applicationId

获取相应的后端应用程序标识符。

string applicationId

属性值

string

DialogTypes

static { BotFramework: string, CustomCommands: string } DialogTypes

属性值

{ BotFramework: string, CustomCommands: string }

outputFormat

OutputFormat outputFormat

属性值

properties

提供对自定义属性的访问权限。

PropertyCollection properties

属性值

属性。

speechRecognitionLanguage

获取语音识别语言。

string speechRecognitionLanguage

属性值

string

方法详细信息

fromAuthorizationToken(string, string, string)

使用指定的语音命令应用程序 ID、授权令牌和区域创建机器人框架配置的实例。 注意:调用方需要确保授权令牌有效。 在授权令牌过期之前,调用方需要使用新的有效令牌调用此 setter 来刷新它。 创建新识别器时复制配置值时,新令牌值将不适用于已创建的识别器。 对于以前创建的识别器,需要设置相应识别器的授权令牌以刷新令牌。 否则,识别器会在识别过程中遇到错误。

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

参数

applicationId

string

语音命令应用程序 ID。

authorizationToken

string

与应用程序关联的授权令牌。

region

string

区域名称(请参阅 区域页)。

返回

新的语音命令配置。

fromSubscription(string, string, string)

使用指定的订阅和区域创建机器人框架配置的实例。

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

参数

applicationId

string

语音命令应用程序 ID。

subscription

string

与机器人关联的订阅密钥

region

string

区域名称(请参阅 区域页)。

返回

新的机器人框架配置。

继承的方法详细信息

close()

释放关联的资源。

function close()

继承自 DialogServiceConfigImpl.close

getProperty(string | PropertyId, string)

将命名属性设置为值

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

参数

name

string | PropertyId

要获取的属性。

def

string

如果属性未知,则返回的默认值。

返回

string

给定属性的当前值或提供的默认值。

继承自 DialogServiceConfigImpl.getProperty

setProperty(string | PropertyId, string)

将命名属性设置为值

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

参数

name

string | PropertyId

要设置的属性。

value

string

值。

继承自 DialogServiceConfigImpl.setProperty

setProxy(string, number, string, string)

设置代理配置。 仅在 Node.js 环境中相关。 在版本 1.4.0 中添加。

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

参数

proxyHostName

string

代理服务器的主机名,没有协议方案(http://)

proxyPort

number

代理服务器的端口号。

proxyUserName

string

代理服务器的用户名。

proxyPassword

string

代理服务器的密码。

继承自 DialogServiceConfigImpl.setProxy

setServiceProperty(string, string, UriQueryParameter)

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

参数

name

string

value

string

继承自 DialogServiceConfigImpl.setServiceProperty