Validation interface

Response returned by a PromptResponseValidator.

Properties

feedback

Optional. Repair instructions to send to the model.

type

Type of the validation object.

valid

Whether the validation is valid.

value

Optional. Replacement value to use for the response.

Property Details

feedback

Optional. Repair instructions to send to the model.

feedback?: string

Property Value

string

Remarks

Should be set if the validation fails.

type

Type of the validation object.

type: "Validation"

Property Value

"Validation"

Remarks

This is used for type checking.

valid

Whether the validation is valid.

valid: boolean

Property Value

boolean

Remarks

If this is false the feedback property will be set, otherwise the value property MAY be set.

value

Optional. Replacement value to use for the response.

value?: TValue

Property Value

TValue

Remarks

Can be set if the validation succeeds. If set, the value will replace the responses message.content property.