# 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 HallucinationCorrector(UniversalBaseModel):
    """
    A hallucination corrector that detects and corrects hallucinations in generated text.
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The unique ID for the Hallucination Corrector (HC).
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The hallucination corrector name, typically including the base name and variant.
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The hallucination corrector type. Defaults to `vectara`.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    A short description of the hallucination corrector’s purpose.
    """

    enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether the hallucination corrector is enabled and available for use in hallucination correction workflows.
    """

    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
