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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class ReviewOption(UncheckedBaseModel):
    """
    Option for categorical human review scorer.

    Defines a choice that humans can select, with an associated score.

    Example:
        option = ReviewOption(
            label="👍 Professional",
            score=1.0,
            description="Response was professional and appropriate",
            color="#10b981"
        )
    """

    label: str = pydantic.Field()
    """
    Display label for this option
    """

    score: float = pydantic.Field()
    """
    Score value (0-1)
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional explanation
    """

    color: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional UI color hint (hex)
    """

    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
