chainlit 1.0.0rc2__py3-none-any.whl → 1.0.0rc3__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.

@@ -20,7 +20,7 @@
20
20
  <script>
21
21
  const global = globalThis;
22
22
  </script>
23
- <script type="module" crossorigin src="/assets/index-aac0232b.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-15bb372a.js"></script>
24
24
  <link rel="stylesheet" href="/assets/index-d088547c.css">
25
25
  </head>
26
26
  <body>
@@ -237,7 +237,6 @@ class AzureOpenAIProvider(BaseProvider):
237
237
  api_version=env_settings["api_version"],
238
238
  azure_endpoint=env_settings["azure_endpoint"],
239
239
  azure_ad_token=self.get_var(request, "AZURE_AD_TOKEN"),
240
- azure_ad_token_provider=self.get_var(request, "AZURE_AD_TOKEN_PROVIDER"),
241
240
  azure_deployment=self.get_var(request, "AZURE_DEPLOYMENT"),
242
241
  )
243
242
  llm_settings = request.generation.settings
@@ -290,7 +289,6 @@ class AzureChatOpenAIProvider(BaseProvider):
290
289
  api_version=env_settings["api_version"],
291
290
  azure_endpoint=env_settings["azure_endpoint"],
292
291
  azure_ad_token=self.get_var(request, "AZURE_AD_TOKEN"),
293
- azure_ad_token_provider=self.get_var(request, "AZURE_AD_TOKEN_PROVIDER"),
294
292
  azure_deployment=self.get_var(request, "AZURE_DEPLOYMENT"),
295
293
  )
296
294
 
chainlit/session.py CHANGED
@@ -56,7 +56,7 @@ class BaseSession:
56
56
  self.user = user
57
57
  self.token = token
58
58
  self.root_message = root_message
59
- self.has_user_message = False
59
+ self.has_first_interaction = False
60
60
  self.user_env = user_env or {}
61
61
  self.chat_profile = chat_profile
62
62
  self.active_steps = []
chainlit/socket.py CHANGED
@@ -138,8 +138,9 @@ async def connection_successful(sid):
138
138
  if context.session.thread_id_to_resume and config.code.on_chat_resume:
139
139
  thread = await resume_thread(context.session)
140
140
  if thread:
141
- context.session.has_user_message = True
141
+ context.session.has_first_interaction = True
142
142
  await context.emitter.clear_ask()
143
+ await context.emitter.emit("first_interaction", "resume")
143
144
  await context.emitter.resume_thread(thread)
144
145
  await config.code.on_chat_resume(thread)
145
146
  return
@@ -173,7 +174,7 @@ async def disconnect(sid):
173
174
  if config.code.on_chat_end and session:
174
175
  await config.code.on_chat_end()
175
176
 
176
- if session and session.thread_id and session.has_user_message:
177
+ if session and session.thread_id and session.has_first_interaction:
177
178
  await persist_user_session(session.thread_id, session.to_persistable())
178
179
 
179
180
  async def disconnect_on_timeout(sid):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chainlit
3
- Version: 1.0.0rc2
3
+ Version: 1.0.0rc3
4
4
  Summary: A faster way to build chatbot UIs.
5
5
  Home-page: https://github.com/Chainlit/chainlit
6
6
  License: Apache-2.0 license
@@ -8,17 +8,17 @@ chainlit/cli/__init__.py,sha256=aMynTbqbJEvxkoIzDjsdKL6wJ0HFgLfVrbxFkwqp1FU,4733
8
8
  chainlit/cli/utils.py,sha256=mE2d9oOk-B2b9ZvDV1zENoDWxjfMriGP7bVwEFduZP4,717
9
9
  chainlit/config.py,sha256=2DaQ51jHKHdwAH0yNbB3HkJhccU99eOqDXxvk19A1jU,10577
10
10
  chainlit/context.py,sha256=Su3eabnD2sgLNx5IwlxEpG4pev64GLi-GlvbE5Mw7sM,2264
11
- chainlit/data/__init__.py,sha256=eSe43GzxTVP76S_gqlt0_Dx-OI1oawTPj6Xflzl_tu0,12998
11
+ chainlit/data/__init__.py,sha256=UEIkeNn1b51OZlrfcXvKr9zuJFUw0LcLP8auvaT16nY,13142
12
12
  chainlit/data/acl.py,sha256=hx7Othkx12EitonyZD4iFIRVHwxBmBY2TKdwjPuZMSo,461
13
- chainlit/element.py,sha256=9dVK7frFjJvmmONWAZTU1LWvim3c4woisy9zX9iEH-s,10010
14
- chainlit/emitter.py,sha256=jlspcgybqohJWXi7LpYJb8olTjapaS5hap2DpAFEzTQ,11073
15
- chainlit/frontend/dist/assets/index-aac0232b.js,sha256=XKLNntNzRIkMPYgrvVdNXzPBvIN_2IscdjKS9kACH2k,3096833
13
+ chainlit/element.py,sha256=cjQDuCSv4OSI2Z0q9JNJf4jn08dAcym6jX8iiHaZrKA,10123
14
+ chainlit/emitter.py,sha256=JJNLCOJH8wn4ai1pvs6jCKLUFLMvZfTgGEzVPdAZ2FA,11105
15
+ chainlit/frontend/dist/assets/index-15bb372a.js,sha256=anV6Q0TCuk8ryrP7gLPQ7B3GjYZbWREJWtO2YfATxJQ,3097023
16
16
  chainlit/frontend/dist/assets/index-d088547c.css,sha256=0IhUfCm_IY1kjvlTR2edW1qKXAFDya3LZ6mnZnP6ovk,6605
17
17
  chainlit/frontend/dist/assets/logo_dark-bc7401f6.svg,sha256=vHQB9g-n5OqOmuH3Fduuc7ZMg0EmMsGyO9cEnYwLbHg,8889
18
18
  chainlit/frontend/dist/assets/logo_light-f19fc2ea.svg,sha256=8Z_C6t-0V9QL9ldmLjaLfp2REcGDuaTeNynj6-6muNI,8891
19
- chainlit/frontend/dist/assets/react-plotly-ae26362f.js,sha256=3v7FFla-SjPPNhN8By6T0H5YqdmGCepH4qeJ6OGhv48,3739251
19
+ chainlit/frontend/dist/assets/react-plotly-c9578a93.js,sha256=LwxrfZi-6Hy97YEflna7FLEhRCH-NtdWIVh_rt1aLes,3739251
20
20
  chainlit/frontend/dist/favicon.svg,sha256=0Cy8x28obT5eWW3nxZRhsEvu6_zMqrqbg0y6hT3D0Q0,6455
21
- chainlit/frontend/dist/index.html,sha256=w1KFM0tp-QkuHE7jgjU-37gdspcYp2Aln02mEoGwy_0,959
21
+ chainlit/frontend/dist/index.html,sha256=MyFb8vlkUbrqhtDzFDyhogbwMNWnSz4GCT680Tf2HjA,959
22
22
  chainlit/haystack/__init__.py,sha256=uZ77YiPy-qleSTi3dQCDO9HE6S6F6GpJWmh7jO4cxXA,217
23
23
  chainlit/haystack/callbacks.py,sha256=0tbevNVa5hqN7Num6PGwm_DU_-ZdhfsVp9srKciotNE,4055
24
24
  chainlit/hello.py,sha256=LwENQWo5s5r8nNDn4iKSV77vX60Ky5r_qGjQhyi7qlY,416
@@ -39,13 +39,13 @@ chainlit/playground/providers/__init__.py,sha256=L4Y7Udpexm769Jnf-mIeN-YGh6xaaMj
39
39
  chainlit/playground/providers/anthropic.py,sha256=Fcozvo4I_hguOuQbI4XgdR8Y03SNNv9PhHZrVXm_4ZE,3447
40
40
  chainlit/playground/providers/huggingface.py,sha256=AmBmIzvfqBjswEI40jifb0OrMQkTk5rXCkGX7nMJ-bk,2130
41
41
  chainlit/playground/providers/langchain.py,sha256=tS4z66CZKdT9ZzwbyrfcpBIzpjD3vS0r6kp8v0xjlMY,2818
42
- chainlit/playground/providers/openai.py,sha256=61Rr_JqfrI5x3CoTdQUvcMm_Q2aXwIuD9aHKvfXvlEY,12593
42
+ chainlit/playground/providers/openai.py,sha256=ch2Eyoz696YJ6H2P1dT6n9RAw-PsiBLVK2_MhgEEcFo,12421
43
43
  chainlit/playground/providers/vertexai.py,sha256=TwFyhNmbStUso0ShvoRzOQ5b4l8ErG1szxqjv4IRXE0,3678
44
44
  chainlit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  chainlit/secret.py,sha256=0MXq8YxTeL93K8IyAew5UgZmIIw9_yJ_Kg4iML6cdVM,296
46
46
  chainlit/server.py,sha256=CEA1pt_RKhDxkE9tWvYvfOGRZ2A0oWMnPEsOO0Y-3eY,20788
47
- chainlit/session.py,sha256=x5Wsid7yO3O6tbQCKLP-cP19wRK-NsnX0bkftL9S8ls,8336
48
- chainlit/socket.py,sha256=vPdAkSoIEKvGu3LuG7y7JP6IZFgFAk5dPW-t1aK6DB8,9066
47
+ chainlit/session.py,sha256=WsTZYIKaMiCpXcxPHd2tKnhL6lk4mVdExwFPPqAUVbo,8341
48
+ chainlit/socket.py,sha256=yqLdBWwUymL86wPaHBP4juv6ElvPY6ip-TsGnx2JgDg,9146
49
49
  chainlit/step.py,sha256=MrdylfS6ZEjmpBKoOyJga7MrCB7x2gv1YT1cUjsBLtg,12184
50
50
  chainlit/sync.py,sha256=G1n-7-3WgXsN8y1bJkEyws_YwmHZIyDZoZUwhprigag,1235
51
51
  chainlit/telemetry.py,sha256=sIZzYk0YEmtWbOS8B5tf6aQfW-uKzwvVtajpbj8bLMw,3210
@@ -54,7 +54,7 @@ chainlit/user.py,sha256=Cw4uGz0ffivWFszv8W__EHwkvTHQ3Lj9hqpRCPxFujo,619
54
54
  chainlit/user_session.py,sha256=nyPx8vSICP8BhpPcW5h9vbHVf9ixj39SrkvJBUI_6zs,1368
55
55
  chainlit/utils.py,sha256=3HzhfZ4XJhBIe9sJ_3Lxv3lMH4mFXsi6nLBGqm8Gtdw,2571
56
56
  chainlit/version.py,sha256=iosXhlXclBwBqlADFKEilxAC2wWKbtuBKi87AmPi7s8,196
57
- chainlit-1.0.0rc2.dist-info/METADATA,sha256=K2pUT8ICwvINenTZp0mDUbyemfQLCxUhpfPGrdbRbIc,5560
58
- chainlit-1.0.0rc2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
59
- chainlit-1.0.0rc2.dist-info/entry_points.txt,sha256=FrkqdjrFl8juSnvBndniyX7XuKojmUwO4ghRh-CFMQc,45
60
- chainlit-1.0.0rc2.dist-info/RECORD,,
57
+ chainlit-1.0.0rc3.dist-info/METADATA,sha256=dVICEyySvIjlNxC1_Nv77VplNyKye2mGx373N5F8SLI,5560
58
+ chainlit-1.0.0rc3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
59
+ chainlit-1.0.0rc3.dist-info/entry_points.txt,sha256=FrkqdjrFl8juSnvBndniyX7XuKojmUwO4ghRh-CFMQc,45
60
+ chainlit-1.0.0rc3.dist-info/RECORD,,