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

import datetime as dt
import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .search_agent_assets_response_data_results_item_asset_type import SearchAgentAssetsResponseDataResultsItemAssetType
from .search_agent_assets_response_data_results_item_chunk_type import SearchAgentAssetsResponseDataResultsItemChunkType


class SearchAgentAssetsResponseDataResultsItem(UniversalBaseModel):
    pk_chunk_id: typing.Optional[int] = pydantic.Field(default=None)
    """
    Unique identifier for the text chunk
    """

    fk_asset_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the asset containing this chunk
    """

    chunk_text: typing.Optional[str] = pydantic.Field(default=None)
    """
    The relevant text content
    """

    chunk_type: typing.Optional[SearchAgentAssetsResponseDataResultsItemChunkType] = None
    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Title of the source asset
    """

    asset_type: typing.Optional[SearchAgentAssetsResponseDataResultsItemAssetType] = None
    date_created: typing.Optional[dt.datetime] = None
    similarity: typing.Optional[float] = pydantic.Field(default=None)
    """
    Similarity score (higher = more relevant)
    """

    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
