dd-trace
    Preparing search index...

    Type Alias ImagePart

    ImagePart:
        | { attachmentKey?: never; content: string; mimeType: string }
        | { attachmentKey: string; content?: never; mimeType: string }

    Represents an image attached to an LLM chat model message, carrying exactly one of inline content or an attachmentKey. Supplying neither or both is rejected by the tagger, and the union keeps both shapes from type-checking.

    Type Declaration

    • { attachmentKey?: never; content: string; mimeType: string }
      • OptionalattachmentKey?: never

        Explicitly excluded when inline content is present to maintain type safety.

      • content: string

        The image content as a base64-encoded string

      • mimeType: string

        The MIME type of the image (e.g. "image/png", "image/jpeg")

    • { attachmentKey: string; content?: never; mimeType: string }
      • attachmentKey: string

        Key of an already-uploaded image, in place of inline content

      • Optionalcontent?: never

        Explicitly excluded when an attachment key is present to maintain type safety.

      • mimeType: string

        The MIME type of the image (e.g. "image/png", "image/jpeg")