chat class
A control that provides the user interface for chatting.
Methods¶
__init__() ¶
__init__(
messages=None,
users=None,
sender_id="taipy",
with_input=True,
on_action=None,
page_size=50,
height=None,
show_sender=False,
mode="markdown",
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new chat
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
list[str]
|
The list of messages. Each item of this list must consist of a list of three strings: a message identifier, a message content, and a user identifier. |
None
|
|
list[Union[str,Icon]]
|
The list of users. See the section on List of Values for more details. |
None
|
|
str
|
The user identifier, as indicated in the users list, associated with all messages sent from the input. |
taipy
|
|
bool
|
If False, the input field is not rendered. |
True
|
|
Union[str, Callable]
|
A function or the name of a function that is triggered when the user enters a new message.
|
None
|
|
int
|
The number of messages retrieved from the application and sent to the frontend. Larger values imply more potential latency. |
50
|
|
Union[str, int, float]
|
The maximum height of this chat control, in CSS units. |
None
|
|
bool
|
If True, the sender avatar and name are displayed. |
False
|
|
str
|
Define the way the messages are processed when they are displayed:
|
markdown
|
|
bool
|
Indicates if this component is active. |
True
|
|
str
|
The identifier that is assigned to the rendered HTML component. |
None
|
|
dict[str, Any]
|
Bound to a dictionary that contains additional properties for this element. |
None
|
|
str
|
The list of CSS class names that are associated with the generated HTML Element. |
None
|
|
str
|
The information that is displayed when the user hovers over this element. |
None
|