Skip to main content

Interface: ChatMessage

Normalized representation of a chat message exchanged with an engine.

Examples

const message: ChatMessage = {
role: 'user',
content: 'How do I deploy my Robo project?'
}
const message: ChatMessage = {
role: 'assistant',
content: '',
function_call: {
name: 'deployProject',
arguments: { target: 'production' }
}
}

Properties

content

content: ChatMessageContent;

Raw or structured message payload.


function_call?

optional function_call: ChatFunctionCall;

Function call issued by the assistant for tool execution.


name?

optional name: string;

Optional author name useful for function-originated replies.


role

role: "function" | "user" | "assistant" | "system";

Role describing the source of the message.