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

from ..core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
from ..core.serialization import FieldMetadata
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ScrapeConfig(UniversalBaseModel):
    optimize_urls: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="optimizeUrls")] = (
        pydantic.Field(default=None)
    )
    """
    URL optimization helps improve performance during model analysis, but limits the model's ability to analyze internal details of URLs (such as individual URL parameters). This setting does not affect the ability to extract URLs or links from web pages -- those will work regardless of how this option is set. However, if you need to analyze URLs themselves and are not getting satisfactory results, try setting this option to 'disabled'. If set to 'auto', Airtop AI will automatically determine whether to apply URL optimization. If 'enabled', URLs will always be optimized to improve performance. If 'disabled', URLs will not be optimized.
    """

    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
