Longbridge OpenAPI SDK
    Preparing search index...

    Interface MessagePayload

    Payload of a message stream event — an incremental text chunk. This is the highest-frequency event; concatenate text fragments in arrival order.

    interface MessagePayload {
        text: string;
        messageType: string;
        key: string;
        startedAt: number;
        stage: string;
        stageTitle: string;
        stageFinishedTitle: string;
        outputs?: any;
    }
    Index
    text: string

    Incremental text fragment

    messageType: string

    answer — final answer text; think — reasoning process; process — stage progress description

    key: string

    Identifier of the stream segment this fragment belongs to. Fragments with the same key form one continuous block — group by key when rendering

    startedAt: number

    Time this segment started, Unix timestamp in seconds

    stage: string

    Stage identifier; only present when messageType is "process"

    stageTitle: string

    Stage title while running; only present when messageType is "process"

    stageFinishedTitle: string

    Stage title after it finishes; only present when messageType is "process"

    outputs?: any

    Extra payload attached to the fragment; usually absent