> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Features

## Options

### File Upload

<ParamField path="spontaneous_file_upload.enabled" type="bool" optional>
  Authorize users to upload files with messages. The files are then accessible
  in [cl.on\_message](/api-reference/lifecycle-hooks/on-message).
</ParamField>

<ParamField path="spontaneous_file_upload.accept" type="Union[List[str], Dict[str, List[str]]]" optional>
  Restrict user to only upload accepted mime file types. Example: \["text/plain",
  "application/pdf", "image/x-png"]
</ParamField>

<ParamField path="spontaneous_file_upload.max_files" type="int" optional>
  Restrict user to upload maximum number of files at a time.
</ParamField>

<ParamField path="spontaneous_file_upload.max_size_mb" type="int" optional>
  Restrict uploading file size (MB).
</ParamField>

### Audio

<ParamField path="audio.enabled" type="bool" default={false}>
  Enable audio features.
</ParamField>

<Warning>
  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.
</Warning>

<ParamField path="audio.sample_rate" type="int" default={24000}>
  Audio sample rate in hertz. Defaults to 24kHz
</ParamField>

### MCP

See [MCP server-side configuration](/advanced-features/mcp#server-side-configuration-config-toml)

### Slack

See [Slack integration documentation](/deploy/slack)

### Favorites

<ParamField path="favorites" type="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](/data-persistence/overview) to store favorites.

  <Note>
    Since version **2.9.5**.
  </Note>
</ParamField>

### Other

<ParamField path="latex" type="bool" default={false}>
  Process and display mathematical expressions. This can clash with "\$"
  characters in messages.
</ParamField>

<ParamField path="user_message_autoscroll" type="bool" default={true}>
  Autoscroll new user messages at the top of the window.
</ParamField>

<ParamField path="assistant_message_autoscroll" type="bool" default={true}>
  Autoscroll assistant messages as they stream. Set to `false` to keep the
  viewport stable while new assistant tokens arrive.

  <Note>
    Since version **2.9.4**.
  </Note>
</ParamField>

<ParamField path="unsafe_allow_html" type="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](https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript)).
</ParamField>

<ParamField path="auto_tag_thread" type="bool" default={true}>
  Automatically tag threads with the current chat profile (if a chat profile is
  used)
</ParamField>

<ParamField path="edit_message" type="bool" default={true}>
  Allow the user to edit their messages.
</ParamField>

<ParamField path="allow_thread_sharing" type="bool" default={false}>
  Allow users to share threads with other users. Requires [authentication](/authentication/overview), [data persistence](/data-persistence/overview), and an [`on_shared_thread_view`](/api-reference/lifecycle-hooks/on-shared-thread-view) callback.
</ParamField>

## Default configuration

```toml theme={null}
[features]
# 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)
unsafe_allow_html = false

# Process and display mathematical expressions. This can clash with "$" characters in messages.
latex = false

# Autoscroll new user messages at the top of the window
user_message_autoscroll = true

# Autoscroll assistant messages as they stream
assistant_message_autoscroll = true

# Automatically tag threads with the current chat profile (if a chat profile is used)
auto_tag_thread = true

# Allow users to edit their own messages
edit_message = true

# Allow users to share threads (requires on_shared_thread_view callback)
allow_thread_sharing = false

# Enable favorite messages (prompt templates)
favorites = false

# Authorize users to spontaneously upload files with messages
[features.spontaneous_file_upload]
    enabled = true
    # Define accepted file types using MIME types
    # Examples:
    # 1. For specific file types:
    #    accept = ["image/jpeg", "image/png", "application/pdf"]
    # 2. For all files of certain type:
    #    accept = ["image/*", "audio/*", "video/*"]
    # 3. For specific file extensions:
    #    accept = {{ "application/octet-stream" = [".xyz", ".pdb"] }}
    # Note: Using "*/*" is not recommended as it may cause browser warnings
    accept = ["*/*"]
    max_files = 20
    max_size_mb = 500

[features.audio]
    # Enable audio features
    enabled = false
    # Sample rate of the audio
    sample_rate = 24000

[features.mcp]
    # Enable Model Context Protocol (MCP) features
    enabled = false
```
