# 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 TopicSegmentResponse(UniversalBaseModel):
    """
    Response from topic segmentation.
    """

    topics: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field()
    """
    Detected topics with label, keywords, time range, and utterance indices
    """

    topic_count: int = pydantic.Field()
    """
    Number of distinct topics detected
    """

    outlier_count: int = pydantic.Field()
    """
    Number of utterances not assigned to any topic
    """

    model: str = pydantic.Field()
    """
    Model used for topic segmentation
    """

    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
