|
2 | 2 | title: Features
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -### Options |
| 5 | +## Options |
6 | 6 |
|
7 |
| -<ParamField path="unsafe_allow_html" type="bool" default={false}> |
8 |
| - Process and display HTML in messages. This can be a security risk (see |
9 |
| - https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript). |
10 |
| -</ParamField> |
11 |
| - |
12 |
| -<ParamField path="edit_message" type="bool" default={true}> |
13 |
| - Allow the user to edit their messages. |
14 |
| -</ParamField> |
15 |
| - |
16 |
| -<ParamField path="latex" type="bool" default={false}> |
17 |
| - Process and display mathematical expressions. This can clash with "$" |
18 |
| - characters in messages. |
19 |
| -</ParamField> |
| 7 | +### File Upload |
20 | 8 |
|
21 |
| -<ParamField path="spontaneous_file_upload.enabled" type="bool" default={true}> |
| 9 | +<ParamField path="spontaneous_file_upload.enabled" type="bool" optional> |
22 | 10 | Authorize users to upload files with messages. The files are then accessible
|
23 | 11 | in [cl.on_message](/api-reference/lifecycle-hooks/on-message).
|
24 | 12 | </ParamField>
|
25 | 13 |
|
26 | 14 | <ParamField
|
27 | 15 | path="spontaneous_file_upload.accept"
|
28 | 16 | type="Union[List[str], Dict[str, List[str]]]"
|
29 |
| - default={["*/*"]} |
| 17 | + optional |
30 | 18 | >
|
31 | 19 | Restrict user to only upload accepted mime file types. Example: ["text/plain",
|
32 | 20 | "application/pdf", "image/x-png"]
|
33 | 21 | </ParamField>
|
34 | 22 |
|
35 |
| -<ParamField path="spontaneous_file_upload.max_files" type="int" default={20}> |
| 23 | +<ParamField path="spontaneous_file_upload.max_files" type="int" optional> |
36 | 24 | Restrict user to upload maximum number of files at a time.
|
37 | 25 | </ParamField>
|
38 | 26 |
|
39 |
| -<ParamField path="spontaneous_file_upload.max_size_mb" type="int" default={500}> |
| 27 | +<ParamField path="spontaneous_file_upload.max_size_mb" type="int" optional> |
40 | 28 | Restrict uploading file size (MB).
|
41 | 29 | </ParamField>
|
42 | 30 |
|
43 |
| -<ParamField path="auto_tag_thread" type="bool"> |
| 31 | +### Audio |
| 32 | + |
| 33 | +<ParamField path="audio.enabled" type="bool" default={false}> |
| 34 | + Restrict uploading file size (MB). |
| 35 | +</ParamField> |
| 36 | + |
| 37 | +<ParamField path="audio.sample_rate" type="int" default={24000}> |
| 38 | + Audio sample rate in hertz. Defaults to 24kHz |
| 39 | +</ParamField> |
| 40 | + |
| 41 | +### MCP |
| 42 | + |
| 43 | +See [MCP server-side configuration](/advanced-features/mcp#server-side-configuration-config-toml) |
| 44 | + |
| 45 | +### Slack |
| 46 | + |
| 47 | +See [Slack integration documentation](/deploy/slack) |
| 48 | + |
| 49 | +### Other |
| 50 | + |
| 51 | +<ParamField path="latex" type="bool" default={false}> |
| 52 | + Process and display mathematical expressions. This can clash with "$" |
| 53 | + characters in messages. |
| 54 | +</ParamField> |
| 55 | + |
| 56 | +<ParamField path="user_message_autoscroll" type="bool" default={true}> |
| 57 | + Autoscroll new user messages at the top of the window. |
| 58 | +</ParamField> |
| 59 | + |
| 60 | +<ParamField path="unsafe_allow_html" type="bool" default={false}> |
| 61 | + Process and display HTML in messages. This can be a security risk (see |
| 62 | + https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript). |
| 63 | +</ParamField> |
| 64 | + |
| 65 | +<ParamField path="auto_tag_thread" type="bool" default={true}> |
44 | 66 | Automatically tag threads with the current chat profile (if a chat profile is
|
45 | 67 | used)
|
46 | 68 | </ParamField>
|
47 | 69 |
|
48 |
| -### Default configuration |
| 70 | +<ParamField path="edit_message" type="bool" default={true}> |
| 71 | + Allow the user to edit their messages. |
| 72 | +</ParamField> |
| 73 | + |
| 74 | +## Default configuration |
49 | 75 |
|
50 | 76 | ```toml
|
51 | 77 | [features]
|
52 |
| -edit_message = true |
| 78 | +# 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) |
53 | 79 | unsafe_allow_html = false
|
| 80 | + |
| 81 | +# Process and display mathematical expressions. This can clash with "$" characters in messages. |
54 | 82 | latex = false
|
| 83 | + |
| 84 | +# Autoscroll new user messages at the top of the window |
| 85 | +user_message_autoscroll = true |
| 86 | + |
| 87 | +# Automatically tag threads with the current chat profile (if a chat profile is used) |
| 88 | +auto_tag_thread = true |
| 89 | + |
| 90 | +# Allow users to edit their own messages |
| 91 | +edit_message = true |
| 92 | + |
| 93 | +# Authorize users to spontaneously upload files with messages |
55 | 94 | [features.spontaneous_file_upload]
|
56 | 95 | enabled = true
|
| 96 | + # Define accepted file types using MIME types |
| 97 | + # Examples: |
| 98 | + # 1. For specific file types: |
| 99 | + # accept = ["image/jpeg", "image/png", "application/pdf"] |
| 100 | + # 2. For all files of certain type: |
| 101 | + # accept = ["image/*", "audio/*", "video/*"] |
| 102 | + # 3. For specific file extensions: |
| 103 | + # accept = {{ "application/octet-stream" = [".xyz", ".pdb"] }} |
| 104 | + # Note: Using "*/*" is not recommended as it may cause browser warnings |
57 | 105 | accept = ["*/*"]
|
58 | 106 | max_files = 20
|
59 | 107 | max_size_mb = 500
|
60 |
| -auto_tag_thread = true |
| 108 | + |
| 109 | +[features.audio] |
| 110 | + # Sample rate of the audio |
| 111 | + sample_rate = 24000 |
61 | 112 | ```
|
0 commit comments