Skip to main content

OnFailAction

OnFailAction is an Enum that represents the different actions that can be taken when a validation fails. Attributes:
  • REASK Literal[“reask”] - On failure, Reask the LLM.
  • FIX Literal[“fix”] - On failure, apply a static fix.
  • FILTER Literal[“filter”] - On failure, filter out the invalid values.
  • REFRAIN Literal[“refrain”] - On failure, refrain from responding; return an empty value.
  • NOOP Literal[“noop”] - On failure, do nothing.
  • EXCEPTION Literal[“exception”] - On failure, raise a ValidationError.
  • FIX_REASK Literal[“fix_reask”] - On failure, apply a static fix, check if the fixed value passed validation, if not then reask the LLM.
  • CUSTOM Literal[“custom”] - On failure, call a custom function with the invalid value and the FailResult’s from any validators run on the value.

RailTypes

RailTypes is an Enum that represents the builtin tags for RAIL xml. Attributes:
  • STRING Literal[“string”] - A string value.
  • INTEGER Literal[“integer”] - An integer value.
  • FLOAT Literal[“float”] - A float value.
  • BOOL Literal[“bool”] - A boolean value.
  • DATE Literal[“date”] - A date value.
  • TIME Literal[“time”] - A time value. DATETIME (Literal[“date-time: - A datetime value.
  • PERCENTAGE Literal[“percentage”] - A percentage value represented as a string. Example “20.5%”.
  • ENUM Literal[“enum”] - An enum value.
  • LIST Literal[“list”] - A list/array value.
  • OBJECT Literal[“object”] - An object/dictionary value.
  • CHOICE Literal[“choice”] - The options for a discrimated union.
  • CASE Literal[“case”] - A dictionary that contains a discrimated union.

MessageHistory

ModelOrListOfModels

ModelOrListOrDict

ModelOrModelUnion

PydanticValidatorTuple

PydanticValidatorSpec

UseValidatorSpec

UseManyValidatorTuple

UseManyValidatorSpec

ValidatorMap