OnFailAction
REASKLiteral[“reask”] - On failure, Reask the LLM.FIXLiteral[“fix”] - On failure, apply a static fix.FILTERLiteral[“filter”] - On failure, filter out the invalid values.REFRAINLiteral[“refrain”] - On failure, refrain from responding; return an empty value.NOOPLiteral[“noop”] - On failure, do nothing.EXCEPTIONLiteral[“exception”] - On failure, raise a ValidationError.FIX_REASKLiteral[“fix_reask”] - On failure, apply a static fix, check if the fixed value passed validation, if not then reask the LLM.CUSTOMLiteral[“custom”] - On failure, call a custom function with the invalid value and the FailResult’s from any validators run on the value.
RailTypes
STRINGLiteral[“string”] - A string value.INTEGERLiteral[“integer”] - An integer value.FLOATLiteral[“float”] - A float value.BOOLLiteral[“bool”] - A boolean value.DATELiteral[“date”] - A date value.TIMELiteral[“time”] - A time value. DATETIME (Literal[“date-time: - A datetime value.PERCENTAGELiteral[“percentage”] - A percentage value represented as a string. Example “20.5%”.ENUMLiteral[“enum”] - An enum value.LISTLiteral[“list”] - A list/array value.OBJECTLiteral[“object”] - An object/dictionary value.CHOICELiteral[“choice”] - The options for a discrimated union.CASELiteral[“case”] - A dictionary that contains a discrimated union.