Text
The Text
class allows you to display a text element in the chatbot UI. This class takes a string and creates a text element that can be sent to the UI.
It supports the markdown syntax for formatting text.
You must provide either an url or a path or content bytes.
Attributes
The name of the text element to be displayed in the UI.
The text string or bytes that should be displayed as the content of the text element.
The remote URL of the text source.
The local file path of the text file.
Determines how the text element should be displayed in the UI. Choices are “side” (default), “inline”, or “page”.
Language of the code if the text is a piece of code. See https://react-code-blocks-rajinwonderland.vercel.app/?path=/story/codeblock—supported-languages for a list of supported languages.
Example
Was this page helpful?