chainlit 1.1.300rc5__py3-none-any.whl → 1.1.301__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/__init__.py +0 -17
- chainlit/cli/__init__.py +5 -0
- chainlit/config.py +0 -1
- chainlit/copilot/dist/index.js +77 -77
- chainlit/emitter.py +4 -4
- chainlit/frontend/dist/assets/{DailyMotion-f9db5a1d.js → DailyMotion-578b63e6.js} +1 -1
- chainlit/frontend/dist/assets/{Facebook-f95b29c9.js → Facebook-b825e5bb.js} +1 -1
- chainlit/frontend/dist/assets/{FilePlayer-ba3f562c.js → FilePlayer-bcba3b4e.js} +1 -1
- chainlit/frontend/dist/assets/{Kaltura-195ed801.js → Kaltura-fc1c9497.js} +1 -1
- chainlit/frontend/dist/assets/{Mixcloud-f64c6d87.js → Mixcloud-4cfb2724.js} +1 -1
- chainlit/frontend/dist/assets/{Mux-206cbddc.js → Mux-aa92055c.js} +1 -1
- chainlit/frontend/dist/assets/{Preview-af249586.js → Preview-9f55905a.js} +1 -1
- chainlit/frontend/dist/assets/{SoundCloud-80a26cdf.js → SoundCloud-f991fe03.js} +1 -1
- chainlit/frontend/dist/assets/{Streamable-f80b255d.js → Streamable-53128f49.js} +1 -1
- chainlit/frontend/dist/assets/{Twitch-0e2f1d13.js → Twitch-fce8b9f5.js} +1 -1
- chainlit/frontend/dist/assets/{Vidyard-bd67bfc6.js → Vidyard-e35c6102.js} +1 -1
- chainlit/frontend/dist/assets/{Vimeo-f9496a5d.js → Vimeo-fff35f8e.js} +1 -1
- chainlit/frontend/dist/assets/{Wistia-a943e0aa.js → Wistia-ec07dc64.js} +1 -1
- chainlit/frontend/dist/assets/{YouTube-cf572a1f.js → YouTube-ad068e2a.js} +1 -1
- chainlit/frontend/dist/assets/index-d40d41cc.js +727 -0
- chainlit/frontend/dist/assets/{react-plotly-74b55763.js → react-plotly-b2c6442b.js} +1 -1
- chainlit/frontend/dist/index.html +1 -1
- chainlit/oauth_providers.py +33 -3
- chainlit/server.py +13 -10
- chainlit/slack/app.py +2 -2
- chainlit/socket.py +5 -22
- chainlit/types.py +1 -1
- chainlit/utils.py +1 -0
- {chainlit-1.1.300rc5.dist-info → chainlit-1.1.301.dist-info}/METADATA +1 -1
- {chainlit-1.1.300rc5.dist-info → chainlit-1.1.301.dist-info}/RECORD +32 -32
- chainlit/frontend/dist/assets/index-5511e258.js +0 -727
- {chainlit-1.1.300rc5.dist-info → chainlit-1.1.301.dist-info}/WHEEL +0 -0
- {chainlit-1.1.300rc5.dist-info → chainlit-1.1.301.dist-info}/entry_points.txt +0 -0
chainlit/__init__.py
CHANGED
|
@@ -190,22 +190,6 @@ def on_chat_resume(func: Callable[[ThreadDict], Any]) -> Callable:
|
|
|
190
190
|
return func
|
|
191
191
|
|
|
192
192
|
|
|
193
|
-
@trace
|
|
194
|
-
def on_system_message(func: Callable) -> Callable:
|
|
195
|
-
"""
|
|
196
|
-
Hook to react to a system message sent by the copilot.
|
|
197
|
-
|
|
198
|
-
Args:
|
|
199
|
-
func (Callable[], Any]): The hook to execute.
|
|
200
|
-
|
|
201
|
-
Returns:
|
|
202
|
-
Callable[], Any]: The decorated hook.
|
|
203
|
-
"""
|
|
204
|
-
|
|
205
|
-
config.code.on_system_message = wrap_user_function(func)
|
|
206
|
-
return func
|
|
207
|
-
|
|
208
|
-
|
|
209
193
|
@trace
|
|
210
194
|
def set_chat_profiles(
|
|
211
195
|
func: Callable[[Optional["User"]], List["ChatProfile"]]
|
|
@@ -416,7 +400,6 @@ __all__ = [
|
|
|
416
400
|
"on_chat_start",
|
|
417
401
|
"on_chat_end",
|
|
418
402
|
"on_chat_resume",
|
|
419
|
-
"on_system_message",
|
|
420
403
|
"on_stop",
|
|
421
404
|
"action_callback",
|
|
422
405
|
"author_rename",
|
chainlit/cli/__init__.py
CHANGED
|
@@ -52,6 +52,10 @@ def run_chainlit(target: str):
|
|
|
52
52
|
"yes",
|
|
53
53
|
] # Convert to boolean
|
|
54
54
|
|
|
55
|
+
ws_protocol = os.environ.get(
|
|
56
|
+
"UVICORN_WS_PROTOCOL", "auto"
|
|
57
|
+
)
|
|
58
|
+
|
|
55
59
|
config.run.host = host
|
|
56
60
|
config.run.port = port
|
|
57
61
|
config.run.root_path = root_path
|
|
@@ -77,6 +81,7 @@ def run_chainlit(target: str):
|
|
|
77
81
|
app,
|
|
78
82
|
host=host,
|
|
79
83
|
port=port,
|
|
84
|
+
ws=ws_protocol,
|
|
80
85
|
log_level=log_level,
|
|
81
86
|
ws_per_message_deflate=ws_per_message_deflate,
|
|
82
87
|
ssl_keyfile=ssl_keyfile,
|
chainlit/config.py
CHANGED
|
@@ -279,7 +279,6 @@ class CodeSettings:
|
|
|
279
279
|
on_message: Optional[Callable[["Message"], Any]] = None
|
|
280
280
|
on_audio_chunk: Optional[Callable[["AudioChunk"], Any]] = None
|
|
281
281
|
on_audio_end: Optional[Callable[[List["ElementBased"]], Any]] = None
|
|
282
|
-
on_system_message: Optional[Callable[["Message"], Any]] = None
|
|
283
282
|
|
|
284
283
|
author_rename: Optional[Callable[[str], str]] = None
|
|
285
284
|
on_settings_update: Optional[Callable[[Dict[str, Any]], Any]] = None
|