LogoRobo.js
Packages@robojs/ai

ChatMessage

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

PropertyTypeDescription
contentChatMessageContentRaw or structured message payload.
function_call?ChatFunctionCallFunction call issued by the assistant for tool execution.
name?stringOptional author name useful for function-originated replies.
role"function" | "user" | "assistant" | "system"Role describing the source of the message.

On this page