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

from ....core.pydantic_utilities import UniversalBaseModel
import typing
from .models import Models
from .transcription import Transcription
import pydantic
from .file import File
from ....core.pydantic_utilities import IS_PYDANTIC_V2


class InferenceRequest(UniversalBaseModel):
    models: typing.Optional[Models] = None
    transcription: typing.Optional[Transcription] = None
    urls: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    URLs to the media files to be processed. Each must be a valid public URL to a media file (see recommended input filetypes) or an archive (`.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`) of media files.
    
    If you wish to supply more than 100 URLs, consider providing them as an archive (`.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`).
    """

    text: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Text to supply directly to our language and NER models.
    """

    callback_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    If provided, a `POST` request will be made to the URL with the generated predictions on completion or the error message on failure.
    """

    notify: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to send an email notification to the user upon job completion/failure.
    """

    files: typing.List[File]

    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
