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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .extract_target import ExtractTarget
import pydantic
from .extract_mode import ExtractMode
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ExtractConfig(UniversalBaseModel):
    """
    Additional parameters for the extraction agent.
    """

    extraction_target: typing.Optional[ExtractTarget] = pydantic.Field(default=None)
    """
    The extraction target specified.
    """

    extraction_mode: typing.Optional[ExtractMode] = pydantic.Field(default=None)
    """
    The extraction mode specified.
    """

    handle_missing: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to handle missing fields in the schema.
    """

    system_prompt: typing.Optional[str] = pydantic.Field(default=None)
    """
    The system prompt to use for the extraction.
    """

    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
