Chat component example

Config options

{{ config | json }}
@if (showComponent) {
@if (showInitialMessage) { You can also use content projection to add any dynamic content to the chat bubble.
} @for (message of displayMessages; track message) { @if (message.role === 'assistant') { } @if (message.role === 'assistant') { } @if (message.role === 'assistant') { } @if (message.role === 'user') { } @if (message.role === 'user') { } } @if (isLoading) { }
}

Show timestamps on chat messages

The option controls the AIMessage objects passed to the component, it's not part of the configuration.