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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .struct_parse_conf import StructParseConf
from .llama_parse_parameters import LlamaParseParameters
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class LlamaExtractSettings(UniversalBaseModel):
    """
    All settings for the extraction agent. Only the settings in ExtractConfig
    are exposed to the user.
    """

    max_file_size: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum file size (in bytes) allowed for the document.
    """

    max_tokens: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum number of tokens allowed for the document.
    """

    max_pages: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum number of pages allowed for the document.
    """

    extraction_agent_config: typing.Optional[typing.Dict[str, StructParseConf]] = pydantic.Field(default=None)
    """
    The configuration for the extraction agent.
    """

    llama_parse_params: typing.Optional[LlamaParseParameters] = pydantic.Field(default=None)
    """
    LlamaParse related settings.
    """

    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
