DialogManager class
Warning
This API is now deprecated.
This class will be deprecated.
Class which runs the dialog system.
- Extends
Constructors
Dialog |
Creates an instance of the DialogSet class. |
Properties
conversation |
Bots persisted conversation state. |
dialogs | Global dialogs that you want to have be callable. |
expire |
Optional. Number of milliseconds to expire the bots conversation state after. |
initial |
Values that will be copied to the |
root |
Root dialog to start from onTurn() method. Gets the root Dialog ID. |
state |
Optional. Path resolvers and memory scopes used for conversations with the bot. |
user |
Optional. Bots persisted user state. |
Methods
configure(Partial<Dialog |
Set configuration settings. |
on |
Runs dialog system in the context of a TurnContext. |
Inherited Methods
get |
Constructor Details
DialogManager(Dialog, string)
Creates an instance of the DialogSet class.
new DialogManager(rootDialog?: Dialog, dialogStateProperty?: string)
Parameters
- dialogStateProperty
-
string
Optional, alternate name for the dialogState property. (Default is "DialogStateProperty")
Property Details
conversationState
Bots persisted conversation state.
conversationState: ConversationState
Property Value
ConversationState
dialogs
expireAfter
Optional. Number of milliseconds to expire the bots conversation state after.
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
TurnContextStateCollection
The turn state collection.
rootDialog
Root dialog to start from onTurn() method. Gets the root Dialog ID.
Dialog rootDialog
Property Value
The root Dialog ID.
stateConfiguration
Optional. Path resolvers and memory scopes used for conversations with the bot.
stateConfiguration?: DialogStateManagerConfiguration
Property Value
userState
Optional. Bots persisted user state.
userState?: UserState
Property Value
UserState
Method Details
configure(Partial<DialogManagerConfiguration>)
Set configuration settings.
function configure(config: Partial<DialogManagerConfiguration>): this
Parameters
- config
-
Partial<DialogManagerConfiguration>
Configuration settings to apply.
Returns
this
The cofigured DialogManager context.
onTurn(TurnContext)
Runs dialog system in the context of a TurnContext.
function onTurn(context: TurnContext): Promise<DialogManagerResult>
Parameters
- context
-
TurnContext
(xref:botbuilder-core.TurnContext) for the current turn of conversation with the user.
Returns
Promise<DialogManagerResult>
Result of running the logic against the activity.
Inherited Method Details
getConverter(string)
function getConverter(_property: string): Converter | ConverterFactory
Parameters
- _property
-
string
The key of the conditional selector configuration.
Returns
The converter for the selector configuration.
Inherited From Configurable.getConverter