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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class Attachment(UniversalBaseModel):
    type: str = pydantic.Field()
    """
    The mime-type of the attachment. Supported types are: 
    - image/jpeg
    - image/jpg
    - image/png
    - image/gif
    - image/webp
    - application/pdf
    - audio/aac
    - audio/mpeg
    - audio/mp4
    - video/mp4
    
    Image attachments will be sent to the LLM as additional data. 
    Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
    """

    content: str = pydantic.Field()
    """
    The attachment data, up to 5MB.
    """

    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
