Assistant Chat¶
The Assistant chat is a widget that renders a chat interface to converse with an LLM. It is the first widget of the Chats family and can be found in the Widgets panel of the stage, under Chats > Assistant chat.
The widget shows the conversation between the user and the assistant, and an input field where users can write their prompt. Each prompt is sent to the custom backend flow defined in the widget layout, and the answer produced by the flow, which has to contain a Conversation structure as the one generated by the Generative AI and Agentic AI tasks, is displayed in the conversation as an HTML text.
When the conversation is empty, the widget shows a welcome text. During the computation of the answer, a loading animation is displayed and the send button turns into a stop button, which allows users to cancel the request.
Note
The widget is not associated to any attribute of the Datasets panel: it only requires the backend connection described in the Backend section of the Layout options window.
Note
The event triggers available for the Assistant chat widget are:
onSendPrompt: the event is triggered when the user sends a prompt.
onReceiveAnswer: the event is triggered when the widget receives the answer from the backend.
Note
The Assistant chat cannot be added to reports.
For the details on the backend requirements and on how the conversation is displayed and stored, see the Chats Behavior section.
Assistant Chat Layout Customization¶
Like all widgets, by right-clicking on the widget border, users can perform several operations through the Widget context menu. These operations are common across all widgets except for the Open widget layout entry, which is specific to each widget type. The Layout options window of the Assistant chat can also be opened by double-clicking on the widget.
In the tables below, users can find all the available options of the Layout options window and their corresponding GOLD references. These settings can also be modified using parametric mode. All the options that are not set fall back to the default values reported in the tables.
Backend
These options define the custom backend that answers the prompts. All of them are mandatory to send a message. The Flow backend can be any flow containing, in the task selected in the Backend endpoint option, a Conversation structure (for example a Generative AI or an Agentic AI task), and a flow variable matching the name set in the Prompt variable option. More details on the backend requirements are available here.
Option |
Description |
GOLD Ref |
|---|---|---|
Flow backend |
It defines the flow of the custom backend that answers the prompt. It can be any flow containing, in the task specified in the Backend endpoint option, a Conversation structure. |
layout |
Backend endpoint |
It defines the task of the flow to be considered to obtain the answer. The task must produce a Conversation structure, as the Generative AI and Agentic AI tasks do. |
layout |
Prompt variable |
It defines the variable of the flow that receives the message written by the user. The flow must contain a flow variable with exactly this name, which has to be used in the configuration of the task (for example in its Prompt option). |
layout |
Window
These options customize the graphical aspect of the chat window.
Option |
Description |
GOLD Ref |
|---|---|---|
Background color |
It defines the background color of the chat. By clicking it, users can select Standard colors and generated color palettes, otherwise they can use the color picker or choose the color code, which can be: Hex, Rgb, Hsl, Hsv. The default color is white ( |
layout |
Opacity (%) |
It defines the transparency of the chat as a percentage, from 0 to 100. The default value is 100. |
layout |
Border color |
It defines the color of the chat border. The color can be chosen as explained for the Background color. The default color is light grey ( |
layout |
Border size (px) |
It defines the thickness of the chat border in pixels. The value must be greater than or equal to 0. The default value is 1. |
layout |
Border style |
It defines the style of the chat border. The possible values are: solid, dashed, dotted, none. The default value is solid. |
layout |
Border radius (px) |
It defines the roundness of the corners of the chat in pixels. The value must be greater than or equal to 0. The default value is 12. |
layout |
Messages
These options customize the aspect of the messages displayed in the conversation.
Option |
Description |
GOLD Ref |
|---|---|---|
Welcome text |
It defines the text shown when the conversation is empty. The default text is How can I help you? |
layout |
User background |
It defines the background color of the messages of the user. The color can be chosen as explained for the Background color. The default color is light blue ( |
layout |
User text |
It defines the text color of the messages of the user. The default color is almost black ( |
layout |
Assistant background |
It defines the background color of the messages of the assistant. The default color is white ( |
layout |
Assistant text |
It defines the text color of the messages of the assistant. This color is also used by the loading label and by the welcome text. The default color is almost black ( |
layout |
Message radius (px) |
It defines the roundness of the corners of the messages in pixels. The value must be greater than or equal to 0. The default value is 12. |
layout |
Message spacing (px) |
It defines the vertical space between the messages in pixels. The value must be greater than or equal to 0. The default value is 24. |
layout |
Max message width (%) |
It defines the maximum width of a message as a percentage of the width of the chat, from 10 to 100. The default value is 80. |
layout |
Composer
These options customize the input field where users write their prompt and the send button.
Option |
Description |
GOLD Ref |
|---|---|---|
Placeholder |
It defines the text shown in the input field when it is empty. The default text is Ask anything… |
layout |
Input background |
It defines the background color of the input field. The color can be chosen as explained for the Background color. The default color is white ( |
layout |
Input text |
It defines the text color of the input field. The default color is dark blue ( |
layout |
Input border |
It defines the border color of the input field. The default color is dark blue ( |
layout |
Input radius (px) |
It defines the roundness of the corners of the input field in pixels. The value must be greater than or equal to 0. The default value is 12. |
layout |
Send button |
It defines the color of the send/stop button. The default color is dark blue ( |
layout |
Text
These options customize the text of the whole chat.
Option |
Description |
GOLD Ref |
|---|---|---|
Font family |
By clicking it, a drop-down menu will show all the available fonts. The default font is Roboto. |
layout |
Font size (px) |
It defines the font size of the text in pixels. The value must be greater than or equal to 1. The default value is 16. |
layout |
Using an Assistant Chat¶
To start working with the Assistant chat, read the following prerequisites and follow the instructions below:
Prerequisites
You must have selected and opened a view in editing mode.
A flow containing a task that produces a Conversation structure (as Generative AI or Agentic AI) and a flow variable to receive the prompt must be available, as described in the Backend connection section.
Procedure
Drag the Assistant chat widget from the Widgets panel, under Chats, onto the slide or dialog.
Double-click on the widget, or choose the Open widget layout entry from the Widget context menu, to open the Layout options window.
In the Backend section, fill the Flow backend, the Backend endpoint (the task producing the Conversation) and the Prompt variable (the flow variable receiving the prompt) options.
Browse through the other sections and customize the graphical aspect of the chat, if desired.
Click APPLY to save the configuration.
Write a prompt in the input field and press the send button to start the conversation.
Tip
If the Layout options window is closed without saving, the changes made to the layout are discarded.