IRMessage
Defined in: packages/ai.matey.types/src/ir.ts:145
A message in the conversation.
Messages can have either simple string content or structured content blocks. The IR normalizes both formats into a consistent representation.
Example
Section titled “Example”// Simple text messageconst textMessage: IRMessage = { role: 'user', content: 'Hello, AI!'};
// Multi-modal message with imageconst multiModalMessage: IRMessage = { role: 'user', content: [ { type: 'text', text: 'What is in this image?' }, { type: 'image', source: { type: 'url', url: 'https://example.com/photo.jpg' } } ]};
// System messageconst systemMessage: IRMessage = { role: 'system', content: 'You are a helpful assistant.'};Properties
Section titled “Properties”content
Section titled “content”
readonlycontent:string| readonlyMessageContent[]
Defined in: packages/ai.matey.types/src/ir.ts:155
Message content. Can be a simple string or array of content blocks.
metadata?
Section titled “metadata?”
readonlyoptionalmetadata:Record<string,unknown>
Defined in: packages/ai.matey.types/src/ir.ts:167
Provider-specific metadata. Stored but not processed by IR.
readonlyoptionalname:string
Defined in: packages/ai.matey.types/src/ir.ts:161
Optional message name/identifier. Used for tool messages or multi-user scenarios.
readonlyrole:MessageRole
Defined in: packages/ai.matey.types/src/ir.ts:149
Message role (system, user, assistant, tool).