Attributes

id
str

The identifier used to retrieve the widget value from the settings.

label
str

The label of the input widget.

initial
List[str]

The initial values of the input widget.

tooltip
str

The tooltip text shown when hovering over the tooltip icon next to the label.

description
str

The text displayed underneath the input widget.

Usage

Code Example
import chainlit as cl
from chainlit.input_widget import Tags


@cl.on_chat_start
async def start():
    settings = await cl.ChatSettings(
        [
            Tags(id="StopSequence", label="OpenAI - StopSequence", initial=["Answer:"]),
        ]
    ).send()
    value = settings["StopSequence"]