Update an existing message.

Parameters

message_id
str

The ID of the message to be updated.

variables
MessageDict

The updated information of the message.

Returns

success
bool
required

True if the message was successfully updated, False otherwise.

Example

Code Example
from chainlit.client.cloud import chainlit_client
from chainlit.client.base import MessageDict

message_id = "12345"

variables = MessageDict(
    author="john_doe",
    content="Updated message content",
)

success = await chainlit_client.update_message(message_id, variables)

if success:
    print("Message updated successfully.")
else:
    print("Failed to update message.")