The Chat component for Retool Apps
An interface for AI chat conversations.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
assistantName
The name of the AI.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
avatarFallback
The text that is displayed when there is no Image URL or icon.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
|
Examples
avatarIcon
The icon that's displayed for the avatar.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
|
Examples
avatarSrc
The image URL to use for the avatar.
Type | string | ||||
Format | url | ||||
Mutability |
|
Examples
data
The data.
Type | array | ||||||
Format | Custom data | ||||||
Mutability |
|
disableSubmit
Whether to disable form submission.
Type | boolean | ||||
Mutability |
|
emptyDescription
The description to display before the first message is sent.
Type | string | ||||
Mutability |
|
emptyTitle
The title to display before the first message is sent.
Type | string | ||||
Mutability |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
messageHistory
A list of messages previously sent and received.
Type | array |
Array values | string |
Mutability | Read-only |
placeholder
The text to display within the input field when there is no value.
Type | string | ||||
Format | string | ||||
Mutability |
| ||||
Default |
|
Examples
queryTargetId
The ID of the query to send messageHistory
to.
Type | string | ||||
Mutability |
|
showEmptyState
Whether to display an empty state before a message is sent. Enabled by adding the Empty state add-on.
Type | boolean | ||||
Mutability |
|
showHeader
Whether to show the header area.
Type | boolean | ||||||
Mutability |
|
showTimestamp
Whether to display a timestamp for messages.
Type | array | ||||
Array values | boolean | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
chat.exportData(options)
Parameters
chat.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
chat.scrollIntoView(options)
Parameters
Examples
chat.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
chat.setHidden(hidden)
Parameters
Examples
chat.setShowHeader(showHeader)
Parameters
Examples
Events
Events triggered by user interactions. Use event handlers to trigger queries or other actions in response to events.