chainlit 0.7.604rc2__py3-none-any.whl → 0.7.700__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/cache.py +3 -3
- chainlit/cli/__init__.py +11 -0
- chainlit/client/cloud.py +2 -0
- chainlit/config.py +9 -1
- chainlit/frontend/dist/assets/index-71698725.js +871 -0
- chainlit/frontend/dist/assets/{react-plotly-16f7de12.js → react-plotly-2c0acdf0.js} +1 -1
- chainlit/frontend/dist/index.html +1 -1
- chainlit/langchain/callbacks.py +3 -0
- chainlit/socket.py +7 -2
- {chainlit-0.7.604rc2.dist-info → chainlit-0.7.700.dist-info}/METADATA +1 -1
- {chainlit-0.7.604rc2.dist-info → chainlit-0.7.700.dist-info}/RECORD +13 -13
- chainlit/frontend/dist/assets/index-c58dbd4b.js +0 -871
- {chainlit-0.7.604rc2.dist-info → chainlit-0.7.700.dist-info}/WHEEL +0 -0
- {chainlit-0.7.604rc2.dist-info → chainlit-0.7.700.dist-info}/entry_points.txt +0 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script>
|
|
21
21
|
const global = globalThis;
|
|
22
22
|
</script>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-71698725.js"></script>
|
|
24
24
|
<link rel="stylesheet" href="/assets/index-8942cb2d.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
chainlit/langchain/callbacks.py
CHANGED
|
@@ -241,9 +241,12 @@ class PromptHelper:
|
|
|
241
241
|
if "placeholder" in class_name.lower():
|
|
242
242
|
variable_name = lc_message.get(
|
|
243
243
|
"variable_name"
|
|
244
|
+
) or message_kwargs.get(
|
|
245
|
+
"variable_name"
|
|
244
246
|
) # type: Optional[str]
|
|
245
247
|
variable = inputs.get(variable_name, [])
|
|
246
248
|
placeholder_size = len(variable)
|
|
249
|
+
|
|
247
250
|
if placeholder_size:
|
|
248
251
|
template_messages += [
|
|
249
252
|
PromptMessage(placeholder_size=placeholder_size)
|
chainlit/socket.py
CHANGED
|
@@ -51,7 +51,7 @@ async def resume_conversation(session: WebsocketSession):
|
|
|
51
51
|
|
|
52
52
|
if conversation and user_is_author:
|
|
53
53
|
metadata = conversation["metadata"] or {}
|
|
54
|
-
user_sessions[session.id] = metadata
|
|
54
|
+
user_sessions[session.id] = metadata.copy()
|
|
55
55
|
if chat_profile := metadata.get("chat_profile"):
|
|
56
56
|
session.chat_profile = chat_profile
|
|
57
57
|
if chat_settings := metadata.get("chat_settings"):
|
|
@@ -146,18 +146,23 @@ async def connection_successful(sid):
|
|
|
146
146
|
conversation = await resume_conversation(context.session)
|
|
147
147
|
if conversation:
|
|
148
148
|
context.session.has_user_message = True
|
|
149
|
+
await context.emitter.clear_ask()
|
|
149
150
|
await config.code.on_chat_resume(conversation)
|
|
150
151
|
await context.emitter.resume_conversation(conversation)
|
|
151
152
|
return
|
|
152
153
|
|
|
153
154
|
if config.code.on_chat_start:
|
|
154
155
|
"""Call the on_chat_start function provided by the developer."""
|
|
156
|
+
await context.emitter.clear_ask()
|
|
155
157
|
await config.code.on_chat_start()
|
|
156
158
|
|
|
157
159
|
|
|
158
160
|
@socket.on("clear_session")
|
|
159
161
|
async def clean_session(sid):
|
|
160
162
|
if session := WebsocketSession.get(sid):
|
|
163
|
+
if config.code.on_chat_end:
|
|
164
|
+
init_ws_context(session)
|
|
165
|
+
await config.code.on_chat_end()
|
|
161
166
|
# Clean up the user session
|
|
162
167
|
if session.id in user_sessions:
|
|
163
168
|
user_sessions.pop(session.id)
|
|
@@ -169,9 +174,9 @@ async def clean_session(sid):
|
|
|
169
174
|
@socket.on("disconnect")
|
|
170
175
|
async def disconnect(sid):
|
|
171
176
|
session = WebsocketSession.get(sid)
|
|
177
|
+
|
|
172
178
|
if config.code.on_chat_end and session:
|
|
173
179
|
init_ws_context(session)
|
|
174
|
-
"""Call the on_chat_end function provided by the developer."""
|
|
175
180
|
await config.code.on_chat_end()
|
|
176
181
|
|
|
177
182
|
if session and session.conversation_id:
|
|
@@ -2,31 +2,31 @@ chainlit/__init__.py,sha256=e215uKlKg0rvx3EIcwn1j9WSJoQwzbwRQx-bP2HI6go,8840
|
|
|
2
2
|
chainlit/__main__.py,sha256=7Vg3w3T3qDuz4KDu5lQhLH6lQ3cYdume7gHH7Z1V97U,87
|
|
3
3
|
chainlit/action.py,sha256=k-GsblVHI4DnDWFyF-RZgq3KfdfAFICFh2OBeU4w8N8,1410
|
|
4
4
|
chainlit/auth.py,sha256=kA9S1aTv7kPFfAzOmwkTlsyE4f17NEwvUCXo49vbUjY,2716
|
|
5
|
-
chainlit/cache.py,sha256=
|
|
5
|
+
chainlit/cache.py,sha256=Bv3dT4eHhE6Fq3c6Do0ZTpiyoXgXYewdxTgpYghEd9g,1361
|
|
6
6
|
chainlit/chat_settings.py,sha256=2ByenmwS8O6jQjDVJjhhbLrBPGA5aY2F7R3VvQQxXPk,877
|
|
7
|
-
chainlit/cli/__init__.py,sha256=
|
|
7
|
+
chainlit/cli/__init__.py,sha256=HpEonQCHdgYnNB0tBq8DXUO4S3MegHHuIn5YOvLLgY4,4793
|
|
8
8
|
chainlit/cli/utils.py,sha256=mE2d9oOk-B2b9ZvDV1zENoDWxjfMriGP7bVwEFduZP4,717
|
|
9
9
|
chainlit/client/base.py,sha256=7hzMJJJK10CQ13dIVgg93vDBy3Y6saDTMftjSF3FaPw,4365
|
|
10
|
-
chainlit/client/cloud.py,sha256=
|
|
11
|
-
chainlit/config.py,sha256=
|
|
10
|
+
chainlit/client/cloud.py,sha256=EXBYtEzt04KcnlGzzkPCx8sjSByNQQ21GB4ekXL81TI,16349
|
|
11
|
+
chainlit/config.py,sha256=zfpNwqD1Iob2CjqEjAazpqoWLCFTX3gF1wLADi6BITo,10646
|
|
12
12
|
chainlit/context.py,sha256=3hrRRB_joQjR8fjKRwpWZqUQNFxS3oXVmXuec7n6pj0,2195
|
|
13
13
|
chainlit/data/__init__.py,sha256=KHS56Bbh1Vx1BfNipO8jC-lTrY8gWSTgJSZK-OHotuQ,373
|
|
14
14
|
chainlit/data/acl.py,sha256=WNp4ytwRmLWLfcSsjAQSbbSwhV3Acbhx1F1gy5qLgMk,474
|
|
15
15
|
chainlit/element.py,sha256=1m-iK90aCAY8kK6nKim4TtKtzFz3hvYnjQW3iDOmtDo,11714
|
|
16
16
|
chainlit/emitter.py,sha256=SmIPoXNExhAIn3wSG0-tcKKyd9HZ3FXXA9S9qYiUEUs,8067
|
|
17
|
+
chainlit/frontend/dist/assets/index-71698725.js,sha256=SgMDc3pdA6Ae_CVniFSUlq7aTB6rx2bAOAlQsj0oebk,3084418
|
|
17
18
|
chainlit/frontend/dist/assets/index-8942cb2d.css,sha256=iULLLdx-rywLKpSdrJuSZwAF22WLkNdLKypNpaN5PQY,6557
|
|
18
|
-
chainlit/frontend/dist/assets/index-c58dbd4b.js,sha256=PBo6I_71wnK-qPDcTWgzTRINDkg2AwoatT0R13lwjAM,2908478
|
|
19
19
|
chainlit/frontend/dist/assets/logo_dark-bc7401f6.svg,sha256=vHQB9g-n5OqOmuH3Fduuc7ZMg0EmMsGyO9cEnYwLbHg,8889
|
|
20
20
|
chainlit/frontend/dist/assets/logo_light-f19fc2ea.svg,sha256=8Z_C6t-0V9QL9ldmLjaLfp2REcGDuaTeNynj6-6muNI,8891
|
|
21
|
-
chainlit/frontend/dist/assets/react-plotly-
|
|
21
|
+
chainlit/frontend/dist/assets/react-plotly-2c0acdf0.js,sha256=acCLmJDbRgiv7mxSHC8_xofgCAIFPcrGDXIRH5231Ko,3739251
|
|
22
22
|
chainlit/frontend/dist/favicon.svg,sha256=0Cy8x28obT5eWW3nxZRhsEvu6_zMqrqbg0y6hT3D0Q0,6455
|
|
23
|
-
chainlit/frontend/dist/index.html,sha256=
|
|
23
|
+
chainlit/frontend/dist/index.html,sha256=q8QL3ovB9FvmXo5wZjOQaiKdy7XzjeQWeafSBVSU1uo,959
|
|
24
24
|
chainlit/haystack/__init__.py,sha256=uZ77YiPy-qleSTi3dQCDO9HE6S6F6GpJWmh7jO4cxXA,217
|
|
25
25
|
chainlit/haystack/callbacks.py,sha256=VCy7v2zlRV9pSSrEfSsd8-dTcAIbIxINdBnJg8zjYXQ,3910
|
|
26
26
|
chainlit/hello.py,sha256=bqKP00i0FKHnZ9fdyVW1a2xDAA1g7IWT0EVzUNky7rA,417
|
|
27
27
|
chainlit/input_widget.py,sha256=1Z1qn3YwaZ7upqqxZXtbfDxBlVobDjbZ3HtlNOj-U3E,4880
|
|
28
28
|
chainlit/langchain/__init__.py,sha256=zErMw0_3ufSGeF9ye7X0ZX3wDat4mTOx97T40ePDO2g,217
|
|
29
|
-
chainlit/langchain/callbacks.py,sha256=
|
|
29
|
+
chainlit/langchain/callbacks.py,sha256=bA9_QMuJHK40CLe4QN2fa1iyWSOXcif2hIdZu45QGYI,23191
|
|
30
30
|
chainlit/langflow/__init__.py,sha256=wxhxdsl1yxdsRyNTgZticxFF_8VFtJJ4OdIy3tnEIyM,817
|
|
31
31
|
chainlit/llama_index/__init__.py,sha256=c7wIUZmKTtZPU9zpdGpKTHctQaBWTuRGqTN0kkIkBcg,218
|
|
32
32
|
chainlit/llama_index/callbacks.py,sha256=2wIADRsy6njqPDyObW9NKZ5FXc-bBkgu5eWmVE03Dc4,4849
|
|
@@ -48,14 +48,14 @@ chainlit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
48
48
|
chainlit/secret.py,sha256=0MXq8YxTeL93K8IyAew5UgZmIIw9_yJ_Kg4iML6cdVM,296
|
|
49
49
|
chainlit/server.py,sha256=J6yQdbvmWwst2mPgzEkBaDfO4nYr5kYOsXyYemgBTXY,19241
|
|
50
50
|
chainlit/session.py,sha256=WOwyPZuqu73GcULkGTjV_Coal1d2cRgEZCmRuHydSyc,6424
|
|
51
|
-
chainlit/socket.py,sha256=
|
|
51
|
+
chainlit/socket.py,sha256=Icz3ZlaaZHLTrG2H4g1KF8Uu2BlWfFUAI6rHn3RjFtc,8560
|
|
52
52
|
chainlit/sync.py,sha256=G1n-7-3WgXsN8y1bJkEyws_YwmHZIyDZoZUwhprigag,1235
|
|
53
53
|
chainlit/telemetry.py,sha256=sIZzYk0YEmtWbOS8B5tf6aQfW-uKzwvVtajpbj8bLMw,3210
|
|
54
54
|
chainlit/types.py,sha256=PLWsBVRyCRYeBshLgg3MpVSAT6rf_eAQ17M6v9Dnik0,2180
|
|
55
55
|
chainlit/user_session.py,sha256=-GjXsuyhx7bvRlCHOqRHh-r6PkCm8fCPJMX6-kTch64,1534
|
|
56
56
|
chainlit/utils.py,sha256=3HzhfZ4XJhBIe9sJ_3Lxv3lMH4mFXsi6nLBGqm8Gtdw,2571
|
|
57
57
|
chainlit/version.py,sha256=iosXhlXclBwBqlADFKEilxAC2wWKbtuBKi87AmPi7s8,196
|
|
58
|
-
chainlit-0.7.
|
|
59
|
-
chainlit-0.7.
|
|
60
|
-
chainlit-0.7.
|
|
61
|
-
chainlit-0.7.
|
|
58
|
+
chainlit-0.7.700.dist-info/METADATA,sha256=CGHGNtpTqdRXmPIyWpvY8gFsJkip1UYe5h9Hg36u9vY,6312
|
|
59
|
+
chainlit-0.7.700.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
60
|
+
chainlit-0.7.700.dist-info/entry_points.txt,sha256=FrkqdjrFl8juSnvBndniyX7XuKojmUwO4ghRh-CFMQc,45
|
|
61
|
+
chainlit-0.7.700.dist-info/RECORD,,
|