Share via


DialogManager class

Class which runs the dialog system.

Extends

Constructors

DialogManager(Dialog<{}>, string)

Creates an instance of the DialogManager class.

Properties

conversationState
dialogs
expireAfter
initialTurnState

Values that will be copied to the TurnContext.turnState at the beginning of each turn.

rootDialog

Gets the root Dialog ID.

stateConfiguration
userState

Methods

configure(Partial<DialogManagerConfiguration>)

Set configuration settings.

onTurn(TurnContext)

Runs dialog system in the context of a TurnContext.

Inherited Methods

getConverter(string)

Gets the converter for the selector configuration. *

Constructor Details

DialogManager(Dialog<{}>, string)

Creates an instance of the DialogManager class.

new DialogManager(rootDialog?: Dialog<{}>, dialogStateProperty?: string)

Parameters

rootDialog

Dialog<{}>

Optional, root Dialog to use.

dialogStateProperty

string

Optional, alternate name for the dialogState property. (Default is "DialogStateProperty")

Property Details

conversationState

conversationState: ConversationState

Property Value

dialogs

dialogs: DialogSet

Property Value

expireAfter

expireAfter?: number

Property Value

number

initialTurnState

Values that will be copied to the TurnContext.turnState at the beginning of each turn.

TurnContextStateCollection initialTurnState

Property Value

The turn state collection.

rootDialog

Gets the root Dialog ID.

Dialog<{}> rootDialog

Property Value

Dialog<{}>

The root Dialog ID.

stateConfiguration

stateConfiguration?: DialogStateManagerConfiguration

Property Value

userState

userState?: UserState

Property Value

Method Details

configure(Partial<DialogManagerConfiguration>)

Set configuration settings.

function configure(config: Partial<DialogManagerConfiguration>): DialogManager

Parameters

config

Partial<DialogManagerConfiguration>

Configuration settings to apply.

Returns

The cofigured DialogManager context.

onTurn(TurnContext)

Runs dialog system in the context of a TurnContext.

function onTurn(context: TurnContext): Promise<DialogManagerResult>

Parameters

context
TurnContext

TurnContext for the current turn of conversation with the user.

Returns

Result of running the logic against the activity.

Inherited Method Details

getConverter(string)

Gets the converter for the selector configuration. *

function getConverter(_property: string): Converter<unknown, unknown> | ConverterFactory<unknown, unknown>

Parameters

_property

string

The key of the conditional selector configuration. *

Returns

Converter<unknown, unknown> | ConverterFactory<unknown, unknown>

The converter for the selector configuration.

Inherited From Configurable.getConverter