# 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 EmotionDetectionResponse(UniversalBaseModel):
    """
    Response from the emotion detection endpoint.
    """

    emotion: str = pydantic.Field()
    """
    Dominant detected emotion
    """

    confidence: float = pydantic.Field()
    """
    Confidence of the dominant emotion (0.0-1.0)
    """

    all_emotions: typing.Dict[str, float] = pydantic.Field()
    """
    All emotion labels with their scores
    """

    processing_time_seconds: float = pydantic.Field()
    """
    Server-side processing time in seconds
    """

    model: str = pydantic.Field()
    """
    Model used for emotion detection
    """

    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
