Skip to main content

Actions

ReAsk

class ReAsk(IReask)

Base class for ReAsk objects.

Attributes:

  • incorrect_value Any - The value that failed validation.
  • fail_results List[FailResult] - The results of the failed validations.

FieldReAsk

class FieldReAsk(ReAsk)

An implementation of ReAsk that is used to reask for a specific field. Inherits from ReAsk.

Attributes:

  • path Optional[List[Any]] - a list of keys that designated the path to the field that failed validation.

SkeletonReAsk

class SkeletonReAsk(ReAsk)

An implementation of ReAsk that is used to reask for structured data when the response does not match the expected schema.

Inherits from ReAsk.

NonParseableReAsk

class NonParseableReAsk(ReAsk)

An implementation of ReAsk that is used to reask for structured data when the response is not parseable as JSON.

Inherits from ReAsk.

Filter

class Filter()

apply_filters

def apply_filters(value: Any) -> Any

Recursively filter out any values that are instances of Filter.

Refrain

class Refrain()

apply_refrain

def apply_refrain(value: Any, output_type: OutputTypes) -> Any

Recursively check for any values that are instances of Refrain.

If found, return an empty value of the appropriate type.