Message
Presentation for user, assistant, tool, and system messages with consumer-rendered content and actions.
Use Message to identify the author or event role with a required label. Render rich content and actions through consumer-owned snippets. Keep tool and system output distinct from assistant prose.
Interactive example
Loading interactive example
API
| Member | Type | Kind | Required | Default |
|---|---|---|---|---|
actions | Snippet | snippet | No | undefined |
avatar | Snippet | snippet | No | undefined |
content | Snippet | snippet | Yes | |
label | string | prop | Yes | |
messageId | string | prop | Yes | |
metadata | Snippet | snippet | No | undefined |
role | MessageRole | prop | Yes |
Examples
Source
Loading source