> ## Documentation Index
> Fetch the complete documentation index at: https://snowglobe.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Types

## OnFailAction

```python theme={null}
class OnFailAction(str, Enum)
```

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

```python theme={null}
class RailTypes(str, Enum)
```

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

```python theme={null}
MessageHistory = List[Dict[str, Union[Prompt, str]]]
```

## ModelOrListOfModels

```python theme={null}
ModelOrListOfModels = Union[Type[BaseModel], Type[List[Type[BaseModel]]]]
```

## ModelOrListOrDict

```python theme={null}
ModelOrListOrDict = Union[Type[BaseModel], Type[List[Type[BaseModel]]],
                          Type[Dict[str, Type[BaseModel]]]]
```

## ModelOrModelUnion

```python theme={null}
ModelOrModelUnion = Union[Type[BaseModel], Union[Type[BaseModel], Any]]
```

## PydanticValidatorTuple

```python theme={null}
PydanticValidatorTuple = Tuple[Union[Validator, str, Callable], str]
```

## PydanticValidatorSpec

```python theme={null}
PydanticValidatorSpec = Union[Validator, PydanticValidatorTuple]
```

## UseValidatorSpec

```python theme={null}
UseValidatorSpec = Union[Validator, Type[Validator]]
```

## UseManyValidatorTuple

```python theme={null}
UseManyValidatorTuple = Tuple[
    Type[Validator],
    Optional[Union[List[Any], Dict[str, Any]]],
    Optional[Dict[str, Any]],
]
```

## UseManyValidatorSpec

```python theme={null}
UseManyValidatorSpec = Union[Validator, UseManyValidatorTuple]
```

## ValidatorMap

```python theme={null}
ValidatorMap = Dict[str, List[Validator]]
```
