Describes the end of a streamed message in a chat response.

interface MessageEndChunk {
    finishReason: string;
    id: string;
    model: string;
    type: "message_end";
    usage: UsageModel;
}

Hierarchy (View Summary)

Properties

finishReason: string

The reason why the message generation finished.

id: string

The unique identifier for the streaming response.

model: string

The model used to generate the response.

type: "message_end"

The type of the chunk indicating the end of the stream.

usage: UsageModel

The usage details associated with the streamed response.