Documentation - v1.2.0-alpha.3
    Preparing search index...

    A related set of dialogs that can all call each other.

    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 createcontext with the current TurnContext. That will create a DialogContext that can be used to start or continue execution of the sets dialogs:

    Index

    Constructors

    • Creates a new DialogSet instance.

      Parameters

      • OptionaldialogState: AgentStatePropertyAccessor<DialogState>

        (Optional) state property used to persist the sets dialog stack.

      Returns DialogSet

      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:

    Methods

    • Adds a new dialog or prompt to the set.

      Type Parameters

      Parameters

      • dialog: T

        The dialog or prompt to add. If a telemetryClient is present on the dialog set, it will be added to each dialog.

      Returns this

      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".

    • Returns a 32-bit hash of the all the Dialog.version values in the set.

      Returns string

      A version that will change when any of the child dialogs version changes.

      This hash is persisted to state storage and used to detect changes to a dialog set.