Chat
Message
The Message
class is designed to send, stream, update or remove messages.
Parameters
content
str
The content of the message.
author
str
The author of the message, defaults to the chatbot name defined in your config file.
elements
Element[]
Elements to attach to the message.
actions
Action[]
Actions to attach to the message.
language
str
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.
Send a message
Send a new message to the UI.
Stream a message
Send a message token by token to the UI.
Update a message
Update a message that already has been sent.
Remove a message
Remove a message from the UI.
Was this page helpful?