Member Junction
    Preparing search index...

    Type Alias ChatMessageContentBlock

    Defines the shape of a content block in a chat message. This can be used to represent different types of content in a message.

    type ChatMessageContentBlock = {
        content: string;
        fileName?: string;
        fileSize?: number;
        height?: number;
        mimeType?: string;
        type: "text" | "image_url" | "video_url" | "audio_url" | "file_url";
        width?: number;
    }
    Index

    Properties

    content: string

    The content of the block. This can be a string. In the case of 'image_url', 'video_url', 'audio_url', or 'file_url', it should be a URL to the resource, OR it can be a base64 encoded string. representing the content of the item. For base64 images, use the data URL format: data:image/png;base64,

    fileName?: string

    Optional original filename if the content was uploaded from a file.

    fileSize?: number

    Optional file size in bytes.

    height?: number

    Optional height in pixels (for images and videos).

    mimeType?: string

    Optional MIME type for media content (e.g., 'image/png', 'image/jpeg', 'audio/mp3'). When content is a data URL, this can be extracted from the URL. When content is raw base64, this field is required.

    type: "text" | "image_url" | "video_url" | "audio_url" | "file_url"

    The type of content block. Can be 'text', 'image_url', 'video_url', 'audio_url', or 'file_url'.

    width?: number

    Optional width in pixels (for images and videos).