Interface Message

Source
Expand description

A single conversation message, normalised across all supported formats.

interface Message {
    content: string;
    role: "system" | "user" | "assistant" | "tool";
    toolCallId?: string;
}

Properties§

§readonly content: string

The text content of the message.

§readonly role: "system" | "user" | "assistant" | "tool"

The role of the message sender.

§readonly toolCallId?: string

Links the result back to its tool call. Only set on "tool" messages.