TheDocumentation Index
Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
Use this file to discover all available pages before exploring further.
Message class is designed to send, stream, update or remove messages.
Parameters
The content of the message.
The author of the message, defaults to the chatbot name defined in your config
file.
Elements to attach to the message.
Actions to attach to the message.
Language of the code if the content is code. See
https://react-code-blocks-rajinwonderland.vercel.app/?path=/story/codeblock—supported-languages
for a list of supported languages.
Custom metadata dictionary to attach to the message. Persisted with the message in the data layer.
Tags to attach to the message for filtering and categorization.
The command selected by the user for this message. Set automatically by the UI when the user picks a command. Access this value in the on_message handler via
msg.command.Since version 2.1.0.
The modes selected by the user for this message, as a dict of
{mode_id: option_id}. Set automatically by the UI when the user configures mode pickers. Access this value in the on_message handler via msg.modes.Since version 2.9.4.
Unique identifier for the message. Auto-generated as a UUID if not provided.
ID of the parent step or message. Automatically resolved from the current step context if not provided.
The message type (
assistant_message or user_message). Automatically set based on the message direction.ISO 8601 timestamp for the message creation. Automatically set to the current UTC time when
.send() is called.