Interface ChatMessage

ChatMessage represents an object that contains the content and a role. It can be used for input and returned as part of the response.

interface ChatMessage {
    content: string;
    reasoning?: string;
    role: Roles;
    toolCalls?: ToolCall[];
}

Properties

content: string

content represents the content of the message.

reasoning?: string

reasoning represents the reasoning content of the message.

role: Roles

role represents the role of the sender (user or assistant).

toolCalls?: ToolCall[]

toolCalls represents the tool calls made by the assistant.