chainlit 2.0.3__py3-none-any.whl → 2.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chainlit might be problematic. Click here for more details.
- chainlit/auth/cookie.py +3 -2
- chainlit/config.py +9 -0
- chainlit/copilot/dist/index.js +199 -199
- chainlit/data/chainlit_data_layer.py +12 -6
- chainlit/emitter.py +1 -0
- chainlit/frontend/dist/assets/{DailyMotion-C_XC7xJI.js → DailyMotion-Ce9dQoqZ.js} +1 -1
- chainlit/frontend/dist/assets/{Dataframe-Cs4l4hA1.js → Dataframe-C1XonMcV.js} +1 -1
- chainlit/frontend/dist/assets/{Facebook-CUeCH7hk.js → Facebook-DVVt6lrr.js} +1 -1
- chainlit/frontend/dist/assets/{FilePlayer-CB-fYkx8.js → FilePlayer-c7stW4vz.js} +1 -1
- chainlit/frontend/dist/assets/{Kaltura-YX6qaq72.js → Kaltura-BmMmgorA.js} +1 -1
- chainlit/frontend/dist/assets/{Mixcloud-DGV0ldjP.js → Mixcloud-Cw8hDmiO.js} +1 -1
- chainlit/frontend/dist/assets/{Mux-CmRss5oc.js → Mux-DiRZfeUf.js} +1 -1
- chainlit/frontend/dist/assets/{Preview-DBVJn7-H.js → Preview-6Jt2mRHx.js} +1 -1
- chainlit/frontend/dist/assets/{SoundCloud-qLUb18oY.js → SoundCloud-DKwcT58_.js} +1 -1
- chainlit/frontend/dist/assets/{Streamable-BvYP7bFp.js → Streamable-BVdxrEeX.js} +1 -1
- chainlit/frontend/dist/assets/{Twitch-CTHt-sGZ.js → Twitch-DFqZR7Gu.js} +1 -1
- chainlit/frontend/dist/assets/{Vidyard-B-0mCJbm.js → Vidyard-0BQAAtVk.js} +1 -1
- chainlit/frontend/dist/assets/{Vimeo-Dnp7ri8q.js → Vimeo-CRFSH0Vu.js} +1 -1
- chainlit/frontend/dist/assets/{Wistia-DW0x_UBn.js → Wistia-CKrmdQaG.js} +1 -1
- chainlit/frontend/dist/assets/{YouTube--98FipvA.js → YouTube-CQpL-rvU.js} +1 -1
- chainlit/frontend/dist/assets/index-DQmLRKyv.css +1 -0
- chainlit/frontend/dist/assets/{index-D71nZ46o.js → index-QdmxtIMQ.js} +1411 -1411
- chainlit/frontend/dist/assets/{react-plotly-Cn_BQTQw.js → react-plotly-B9hvVpUG.js} +1 -1
- chainlit/frontend/dist/index.html +2 -2
- chainlit/server.py +2 -2
- chainlit/translations/bn.json +9 -0
- chainlit/translations/en-US.json +40 -5
- chainlit/translations/gu.json +9 -0
- chainlit/translations/he-IL.json +9 -0
- chainlit/translations/hi.json +9 -0
- chainlit/translations/ja.json +242 -0
- chainlit/translations/kn.json +9 -0
- chainlit/translations/ml.json +9 -0
- chainlit/translations/mr.json +9 -0
- chainlit/translations/nl-NL.json +9 -0
- chainlit/translations/ta.json +9 -0
- chainlit/translations/te.json +9 -0
- chainlit/translations/zh-CN.json +13 -3
- chainlit/version.py +1 -1
- {chainlit-2.0.3.dist-info → chainlit-2.0.4.dist-info}/METADATA +1 -1
- {chainlit-2.0.3.dist-info → chainlit-2.0.4.dist-info}/RECORD +43 -42
- chainlit/frontend/dist/assets/index-g8LTJwwr.css +0 -1
- {chainlit-2.0.3.dist-info → chainlit-2.0.4.dist-info}/WHEEL +0 -0
- {chainlit-2.0.3.dist-info → chainlit-2.0.4.dist-info}/entry_points.txt +0 -0
chainlit/auth/cookie.py
CHANGED
|
@@ -7,6 +7,8 @@ from fastapi.security.base import SecurityBase
|
|
|
7
7
|
from fastapi.security.utils import get_authorization_scheme_param
|
|
8
8
|
from starlette.status import HTTP_401_UNAUTHORIZED
|
|
9
9
|
|
|
10
|
+
from chainlit.config import config
|
|
11
|
+
|
|
10
12
|
""" Module level cookie settings. """
|
|
11
13
|
_cookie_samesite = cast(
|
|
12
14
|
Literal["lax", "strict", "none"],
|
|
@@ -22,7 +24,6 @@ assert _cookie_samesite in [
|
|
|
22
24
|
)
|
|
23
25
|
_cookie_secure = _cookie_samesite == "none"
|
|
24
26
|
|
|
25
|
-
_auth_cookie_lifetime = 60 * 60 # 1 hour
|
|
26
27
|
_state_cookie_lifetime = 3 * 60 # 3m
|
|
27
28
|
_auth_cookie_name = "access_token"
|
|
28
29
|
_state_cookie_name = "oauth_state"
|
|
@@ -86,7 +87,7 @@ def set_auth_cookie(response: Response, token: str):
|
|
|
86
87
|
httponly=True,
|
|
87
88
|
secure=_cookie_secure,
|
|
88
89
|
samesite=_cookie_samesite,
|
|
89
|
-
max_age=
|
|
90
|
+
max_age=config.project.user_session_timeout,
|
|
90
91
|
)
|
|
91
92
|
|
|
92
93
|
|
chainlit/config.py
CHANGED
|
@@ -96,6 +96,15 @@ edit_message = true
|
|
|
96
96
|
# Authorize users to spontaneously upload files with messages
|
|
97
97
|
[features.spontaneous_file_upload]
|
|
98
98
|
enabled = true
|
|
99
|
+
# Define accepted file types using MIME types
|
|
100
|
+
# Examples:
|
|
101
|
+
# 1. For specific file types:
|
|
102
|
+
# accept = ["image/jpeg", "image/png", "application/pdf"]
|
|
103
|
+
# 2. For all files of certain type:
|
|
104
|
+
# accept = ["image/*", "audio/*", "video/*"]
|
|
105
|
+
# 3. For specific file extensions:
|
|
106
|
+
# accept = {{ "application/octet-stream" = [".xyz", ".pdb"] }}
|
|
107
|
+
# Note: Using "*/*" is not recommended as it may cause browser warnings
|
|
99
108
|
accept = ["*/*"]
|
|
100
109
|
max_files = 20
|
|
101
110
|
max_size_mb = 500
|