# Module `module.name` Documentation

## Class `BaseEvaluator`
Usage docs: https://docs.pydantic.dev/2.7/concepts/models/

A base class for creating Pydantic models.

Attributes:
    __class_vars__: The names of classvars defined on the model.
    __private_attributes__: Metadata about the private attributes of the model.
    __signature__: The signature for instantiating the model.

    __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
    __pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
    __pydantic_custom_init__: Whether the model has a custom `__init__` function.
    __pydantic_decorators__: Metadata containing the decorators defined on the model.
        This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
    __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
        __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
    __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
    __pydantic_post_init__: The name of the post-init method for the model, if defined.
    __pydantic_root_model__: Whether the model is a `RootModel`.
    __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
    __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.

    __pydantic_extra__: An instance attribute with the values of extra fields from validation when
        `model_config['extra'] == 'allow'`.
    __pydantic_fields_set__: An instance attribute with the names of fields explicitly set.
    __pydantic_private__: Instance attribute with the values of private attributes set on the model instance.

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
None

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_evaluate_entry`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `evaluate`
None

### Method `evaluate_batch`
None

### Method `get_env`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

## Class `EnvMissingException`
EnvMissingException(message: str)

### Method `__eq__`
None

### Method `__init__`
None

### Method `__repr__`
None

## Class `EvaluationResult`
Evaluation result for a single entry that was successfully processed.
Score represents different things depending on the evaluator, it can be a percentage, a probability, a distance, etc.
Passed is a boolean that represents if the entry passed the evaluation or not, it can be None if the evaluator does not have a concept of passing or failing.
Details is an optional string that can be used to provide additional information about the evaluation result.

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

## Class `EvaluationResultError`
Evaluation result marking an entry that failed to be processed due to an error.

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

## Class `EvaluationResultSkipped`
Evaluation result marking an entry that was skipped with an optional details explanation.

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

## Class `EvaluatorEntry`
Entry datapoint for an evaluator, it should contain all the necessary information for the evaluator to run.

Available fields are:

input: The user or LLM input given to the model
output: The LLM generated output
contexts: A list of strings of the contexts that were considered when generating the LLM response
expected_output: The ground truth of what the LLM should have generated, for comparison with the actual generated output

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

## Class `Money`
Usage docs: https://docs.pydantic.dev/2.7/concepts/models/

A base class for creating Pydantic models.

Attributes:
    __class_vars__: The names of classvars defined on the model.
    __private_attributes__: Metadata about the private attributes of the model.
    __signature__: The signature for instantiating the model.

    __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
    __pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
    __pydantic_custom_init__: Whether the model has a custom `__init__` function.
    __pydantic_decorators__: Metadata containing the decorators defined on the model.
        This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
    __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
        __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
    __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
    __pydantic_post_init__: The name of the post-init method for the model, if defined.
    __pydantic_root_model__: Whether the model is a `RootModel`.
    __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
    __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.

    __pydantic_extra__: An instance attribute with the values of extra fields from validation when
        `model_config['extra'] == 'allow'`.
    __pydantic_fields_set__: An instance attribute with the names of fields explicitly set.
    __pydantic_private__: Instance attribute with the values of private attributes set on the model instance.

### Method `__copy__`
Returns a shallow copy of the model.

### Method `__deepcopy__`
Returns a deep copy of the model.

### Method `__delattr__`
Implement delattr(self, name).

### Method `__eq__`
Return self==value.

### Method `__getattr__`
None

### Method `__getstate__`
Helper for pickle.

### Method `__init__`
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

### Method `__iter__`
So `dict(model)` works.

### Method `__pretty__`
Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

### Method `__repr__`
Return repr(self).

### Method `__repr_args__`
None

### Method `__repr_name__`
Name of the instance's class, used in __repr__.

### Method `__repr_str__`
None

### Method `__rich_repr__`
Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

### Method `__setattr__`
Implement setattr(self, name, value).

### Method `__setstate__`
None

### Method `__str__`
Return str(self).

### Method `_calculate_keys`
None

### Method `_check_frozen`
None

### Method `_copy_and_set_values`
None

### Method `_iter`
None

### Method `copy`
Returns a copy of the model.

!!! warning "Deprecated"
    This method is now deprecated; use `model_copy` instead.

If you need `include` or `exclude`, use:

```py
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
```

Args:
    include: Optional set or mapping specifying which fields to include in the copied model.
    exclude: Optional set or mapping specifying which fields to exclude in the copied model.
    update: Optional dictionary of field-value pairs to override field values in the copied model.
    deep: If True, the values of fields that are Pydantic models will be deep-copied.

Returns:
    A copy of the model with included, excluded and updated fields as specified.

### Method `dict`
None

### Method `json`
None

### Method `model_copy`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

### Method `model_dump`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

### Method `model_dump_json`
Usage docs: https://docs.pydantic.dev/2.7/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

### Method `model_post_init`
Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

