PromptResponseValidator interface
A validator that can be used to validate prompt responses.
Methods
validate |
Validates a response to a prompt. |
Method Details
validateResponse(TurnContext, Memory, Tokenizer, PromptResponse<string>, number)
Validates a response to a prompt.
function validateResponse(context: TurnContext, memory: Memory, tokenizer: Tokenizer, response: PromptResponse<string>, remaining_attempts: number): Promise<Validation<TValue>>
Parameters
- context
-
TurnContext
Context for the current turn of conversation with the user.
- memory
- Memory
An interface for accessing state values.
- tokenizer
- Tokenizer
Tokenizer to use for encoding and decoding text.
- response
-
PromptResponse<string>
Response to validate.
- remaining_attempts
-
number
Number of remaining attempts to validate the response.
Returns
Promise<Validation<TValue>>
A Validation
object.