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
| Property | Type | Description |
|---|---|---|
content | ChatMessageContent | Raw or structured message payload. |
function_call? | ChatFunctionCall | Function call issued by the assistant for tool execution. |
name? | string | Optional author name useful for function-originated replies. |
role | "function" | "user" | "assistant" | "system" | Role describing the source of the message. |
