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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .composite_retrieved_text_node_with_score import CompositeRetrievedTextNodeWithScore
import pydantic
from .page_screenshot_node_with_score import PageScreenshotNodeWithScore
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CompositeRetrievalResult(UniversalBaseModel):
    nodes: typing.Optional[typing.List[CompositeRetrievedTextNodeWithScore]] = pydantic.Field(default=None)
    """
    The retrieved nodes from the composite retrieval.
    """

    image_nodes: typing.Optional[typing.List[PageScreenshotNodeWithScore]] = pydantic.Field(default=None)
    """
    The image nodes retrieved by the pipeline for the given query.
    """

    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
