Skip to main content

Options

File Upload

bool
Authorize users to upload files with messages. The files are then accessible in cl.on_message.
Union[List[str], Dict[str, List[str]]]
Restrict user to only upload accepted mime file types. Example: [“text/plain”, “application/pdf”, “image/x-png”]
int
Restrict user to upload maximum number of files at a time.
int
Restrict uploading file size (MB).

Audio

bool
default:false
Enable audio features.
Since Chainlit 2.7.0, audio.enabled must be explicitly set to true in config.toml. It is no longer auto-inferred from the existence of an on_audio_chunk callback.
int
default:24000
Audio sample rate in hertz. Defaults to 24kHz

MCP

See MCP server-side configuration

Slack

See Slack integration documentation

Favorites

bool
default:false
Enable favorite messages (prompt templates). When enabled, users can star their own messages and reuse them as prompt templates from the composer. Requires data persistence to store favorites.
Since version 2.9.5.

Other

bool
default:false
Process and display mathematical expressions. This can clash with ”$” characters in messages.
bool
default:true
Autoscroll new user messages at the top of the window.
bool
default:true
Autoscroll assistant messages as they stream. Set to false to keep the viewport stable while new assistant tokens arrive.
Since version 2.9.4.
bool
default:false
Process and display HTML in messages. This can be a security risk (see https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript).
bool
default:true
Automatically tag threads with the current chat profile (if a chat profile is used)
bool
default:true
Allow the user to edit their messages.
bool
default:false
Allow users to share threads with other users. Requires authentication, data persistence, and an on_shared_thread_view callback.

Default configuration