# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class HcmSourceDocument(UniversalBaseModel):
    """
    An array of source documents used to verify the factual accuracy of the generated text. Each document should reflect the context used to generate the original text.
    """

    text: str = pydantic.Field()
    """
    The full text content of the source document. Hallucination correction uses this content as the factual basis for correcting the generated text.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
