PromptValidatorContext interface

Contextual information passed to a custom PromptValidator.

Properties

attemptCount

A count of the number of times the prompt has been executed. A number indicating how many times the prompt was invoked (starting at 1 for the first time it was invoked).

context

The context for the current turn of conversation with the user.

options

Original set of options passed to the prompt by the calling dialog.

recognized

Result returned from the prompts recognizer function.

state

A dictionary of values persisted for each conversational turn while the prompt is active.

Property Details

attemptCount

A count of the number of times the prompt has been executed. A number indicating how many times the prompt was invoked (starting at 1 for the first time it was invoked).

attemptCount: number

Property Value

number

context

The context for the current turn of conversation with the user.

context: TurnContext

Property Value

TurnContext

Remarks

The validator can use this to re-prompt the user.

options

Original set of options passed to the prompt by the calling dialog.

options: PromptOptions

Property Value

Remarks

The validator can extend this interface to support additional prompt options.

recognized

Result returned from the prompts recognizer function.

recognized: PromptRecognizerResult<T>

Property Value

Remarks

The prompt.recognized.succeeded field can be checked to determine of the recognizer found anything and then the value can be retrieved from prompt.recognized.value.

state

A dictionary of values persisted for each conversational turn while the prompt is active.

state: object

Property Value

object

Remarks

The validator can use this to persist things like turn counts or other state information.