Creates a new DialogSet instance.
OptionaldialogState: AgentStatePropertyAccessor<DialogState>(Optional) state property used to persist the sets dialog stack.
If the dialogState parameter is not passed in, calls to createContext
will return an error. You will need to create a DialogContext for the set manually and
pass in your own state object for persisting the sets dialog stack:
Adds a new dialog or prompt to the set.
The dialog or prompt to add. If a telemetryClient is present on the dialog set, it will be added to each dialog.
The dialog set after the operation is complete.
If the Dialog.id being added already exists in the set, the dialogs id will be updated to include a suffix which makes it unique. So adding 2 dialogs named "duplicate" to the set would result in the first one having an id of "duplicate" and the second one having an id of "duplicate2".
Creates a dialog context which can be used to work with the dialogs in the set.
Context for the current turn of conversation with the user.
A promise representing the asynchronous operation.
Finds a dialog that was previously added to the set using add.
ID of the dialog or prompt to lookup.
The dialog if found; otherwise undefined.
A related set of dialogs that can all call each other.
Remarks
The constructor for the dialog set should be passed a state property that will be used to persist the dialog stack for the set:
To interact with the sets dialogs you can call
createcontextwith the current TurnContext. That will create a DialogContext that can be used to start or continue execution of the sets dialogs: