Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias UploadMediaParamsInternal

    Parameters for uploadMedia.

    type UploadMediaParams = {
        apiClient: LangfuseAPIClient;
        baseDelay?: number;
        datasetId?: string;
        datasetItemId?: string;
        field?: string;
        logger?: Logger;
        maxRetries?: number;
        media: LangfuseMedia;
        observationId?: string;
        traceId?: string;
    }
    Index

    Properties

    The API client used to request the upload URL and report completion.

    baseDelay?: number

    Base delay in milliseconds for exponential backoff. Defaults to 1000.

    datasetId?: string

    The dataset the media belongs to. Set together with datasetItemId for dataset item media (instead of a trace context).

    datasetItemId?: string

    The dataset item the media belongs to (need not exist yet).

    field?: string

    The item field the media is associated with — input/output/metadata for a trace, or input/expectedOutput/metadata for a dataset item.

    logger?: Logger

    Logger to use. Defaults to the global logger.

    maxRetries?: number

    Maximum number of upload retries on transient failures. Defaults to 3.

    The media to upload.

    observationId?: string

    The observation the media belongs to, if any.

    traceId?: string

    The trace the media belongs to. Omit for media that is not associated with a trace (e.g. dataset item media).