chainlit 1.1.0__tar.gz → 1.1.0rc0__tar.gz

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.

Files changed (72) hide show
  1. {chainlit-1.1.0 → chainlit-1.1.0rc0}/PKG-INFO +3 -4
  2. {chainlit-1.1.0 → chainlit-1.1.0rc0}/README.md +0 -2
  3. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/config.py +2 -4
  4. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/context.py +7 -19
  5. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/copilot/dist/index.js +521 -639
  6. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/data/acl.py +1 -4
  7. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/data/sql_alchemy.py +21 -22
  8. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/element.py +2 -5
  9. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/emitter.py +2 -11
  10. chainlit-1.1.0/chainlit/frontend/dist/assets/index-0a52365d.js → chainlit-1.1.0rc0/chainlit/frontend/dist/assets/index-032fca02.js +120 -120
  11. chainlit-1.1.0rc0/chainlit/frontend/dist/assets/react-plotly-8c993614.js +3484 -0
  12. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/frontend/dist/index.html +1 -1
  13. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/server.py +4 -27
  14. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/session.py +61 -72
  15. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/socket.py +15 -21
  16. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/step.py +1 -25
  17. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/types.py +1 -2
  18. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/user_session.py +2 -5
  19. {chainlit-1.1.0 → chainlit-1.1.0rc0}/pyproject.toml +4 -9
  20. chainlit-1.1.0/chainlit/discord/__init__.py +0 -6
  21. chainlit-1.1.0/chainlit/discord/app.py +0 -304
  22. chainlit-1.1.0/chainlit/frontend/dist/assets/react-plotly-509d26a7.js +0 -3602
  23. chainlit-1.1.0/chainlit/slack/__init__.py +0 -6
  24. chainlit-1.1.0/chainlit/slack/app.py +0 -368
  25. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/__init__.py +0 -0
  26. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/__main__.py +0 -0
  27. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/action.py +0 -0
  28. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/auth.py +0 -0
  29. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/cache.py +0 -0
  30. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/chat_settings.py +0 -0
  31. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/cli/__init__.py +0 -0
  32. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/cli/utils.py +0 -0
  33. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/copilot/dist/assets/logo_dark-2a3cf740.svg +0 -0
  34. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/copilot/dist/assets/logo_light-b078e7bc.svg +0 -0
  35. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/data/__init__.py +0 -0
  36. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/data/storage_clients.py +0 -0
  37. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/frontend/dist/assets/index-d088547c.css +0 -0
  38. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/frontend/dist/assets/logo_dark-2a3cf740.svg +0 -0
  39. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/frontend/dist/assets/logo_light-b078e7bc.svg +0 -0
  40. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/frontend/dist/favicon.svg +0 -0
  41. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/haystack/__init__.py +0 -0
  42. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/haystack/callbacks.py +0 -0
  43. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/hello.py +0 -0
  44. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/input_widget.py +0 -0
  45. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/langchain/__init__.py +0 -0
  46. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/langchain/callbacks.py +0 -0
  47. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/langflow/__init__.py +0 -0
  48. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/llama_index/__init__.py +0 -0
  49. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/llama_index/callbacks.py +0 -0
  50. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/logger.py +0 -0
  51. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/markdown.py +0 -0
  52. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/message.py +0 -0
  53. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/oauth_providers.py +0 -0
  54. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/openai/__init__.py +0 -0
  55. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/__init__.py +0 -0
  56. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/config.py +0 -0
  57. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/provider.py +0 -0
  58. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/__init__.py +0 -0
  59. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/anthropic.py +0 -0
  60. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/huggingface.py +0 -0
  61. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/langchain.py +0 -0
  62. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/openai.py +0 -0
  63. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/playground/providers/vertexai.py +0 -0
  64. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/py.typed +0 -0
  65. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/secret.py +0 -0
  66. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/sync.py +0 -0
  67. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/telemetry.py +0 -0
  68. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/translations/en-US.json +0 -0
  69. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/translations.py +0 -0
  70. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/user.py +0 -0
  71. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/utils.py +0 -0
  72. {chainlit-1.1.0 → chainlit-1.1.0rc0}/chainlit/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chainlit
3
- Version: 1.1.0
3
+ Version: 1.1.0rc0
4
4
  Summary: Build Conversational AI.
5
5
  Home-page: https://github.com/Chainlit/chainlit
6
6
  License: Apache-2.0 license
@@ -22,12 +22,13 @@ Requires-Dist: fastapi-socketio (>=0.0.10,<0.0.11)
22
22
  Requires-Dist: filetype (>=1.2.0,<2.0.0)
23
23
  Requires-Dist: httpx (>=0.23.0)
24
24
  Requires-Dist: lazify (>=0.4.0,<0.5.0)
25
- Requires-Dist: literalai (==0.0.601)
25
+ Requires-Dist: literalai (==0.0.509)
26
26
  Requires-Dist: nest-asyncio (>=1.5.6,<2.0.0)
27
27
  Requires-Dist: packaging (>=23.1,<24.0)
28
28
  Requires-Dist: pydantic (>=1,<3)
29
29
  Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
30
30
  Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
31
+ Requires-Dist: python-graphql-client (>=0.4.3,<0.5.0)
31
32
  Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
32
33
  Requires-Dist: starlette (>=0.37.2,<0.38.0)
33
34
  Requires-Dist: syncer (>=2.0.3,<3.0.0)
@@ -50,7 +51,6 @@ Chainlit is an open-source async Python framework which allows developers to bui
50
51
 
51
52
  - ✅ ChatGPT-like application
52
53
  - ✅ Embedded Chatbot & Software Copilot
53
- - ✅ Slack & Discord
54
54
  - ✅ Custom frontend (build your own agentic experience)
55
55
  - ✅ API Endpoint
56
56
 
@@ -113,7 +113,6 @@ $ chainlit run demo.py -w
113
113
  ```
114
114
 
115
115
  <img src="/images/quick-start.png" alt="Quick Start"></img>
116
-
117
116
  ## 🎉 Key Features and Integrations
118
117
 
119
118
  Full documentation is available [here](https://docs.chainlit.io). Key features:
@@ -10,7 +10,6 @@ Chainlit is an open-source async Python framework which allows developers to bui
10
10
 
11
11
  - ✅ ChatGPT-like application
12
12
  - ✅ Embedded Chatbot & Software Copilot
13
- - ✅ Slack & Discord
14
13
  - ✅ Custom frontend (build your own agentic experience)
15
14
  - ✅ API Endpoint
16
15
 
@@ -73,7 +72,6 @@ $ chainlit run demo.py -w
73
72
  ```
74
73
 
75
74
  <img src="/images/quick-start.png" alt="Quick Start"></img>
76
-
77
75
  ## 🎉 Key Features and Integrations
78
76
 
79
77
  Full documentation is available [here](https://docs.chainlit.io). Key features:
@@ -4,7 +4,7 @@ import site
4
4
  import sys
5
5
  from importlib import util
6
6
  from pathlib import Path
7
- from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union, Literal
7
+ from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
8
8
 
9
9
  import tomli
10
10
  from chainlit.logger import logger
@@ -132,10 +132,9 @@ hide_cot = false
132
132
  # Be careful: If this is a relative path, it should not start with a slash.
133
133
  # custom_build = "./public/build"
134
134
 
135
+ # Override default MUI light theme. (Check theme.ts)
135
136
  [UI.theme]
136
- #layout = "wide"
137
137
  #font_family = "Inter, sans-serif"
138
- # Override default MUI light theme. (Check theme.ts)
139
138
  [UI.theme.light]
140
139
  #background = "#FAFAFA"
141
140
  #paper = "#FFFFFF"
@@ -195,7 +194,6 @@ class Palette(DataClassJsonMixin):
195
194
  @dataclass()
196
195
  class Theme(DataClassJsonMixin):
197
196
  font_family: Optional[str] = None
198
- layout: Optional[Literal["default", "wide"]] = "default"
199
197
  light: Optional[Palette] = None
200
198
  dark: Optional[Palette] = None
201
199
 
@@ -1,15 +1,15 @@
1
1
  import asyncio
2
2
  import uuid
3
3
  from contextvars import ContextVar
4
- from typing import TYPE_CHECKING, Dict, List, Optional, Union
4
+ from typing import TYPE_CHECKING, Dict, Optional, Union, List
5
5
 
6
- from chainlit.session import ClientType, HTTPSession, WebsocketSession
6
+ from chainlit.session import HTTPSession, WebsocketSession
7
7
  from lazify import LazyProxy
8
8
 
9
9
  if TYPE_CHECKING:
10
10
  from chainlit.emitter import BaseChainlitEmitter
11
- from chainlit.step import Step
12
11
  from chainlit.user import PersistedUser, User
12
+ from chainlit.step import Step
13
13
 
14
14
 
15
15
  class ChainlitContextException(Exception):
@@ -28,20 +28,13 @@ class ChainlitContext:
28
28
  if self.active_steps:
29
29
  return self.active_steps[-1]
30
30
 
31
- def __init__(
32
- self,
33
- session: Union["HTTPSession", "WebsocketSession"],
34
- emitter: Optional["BaseChainlitEmitter"] = None,
35
- ):
31
+ def __init__(self, session: Union["HTTPSession", "WebsocketSession"]):
36
32
  from chainlit.emitter import BaseChainlitEmitter, ChainlitEmitter
37
33
 
38
34
  self.loop = asyncio.get_running_loop()
39
35
  self.session = session
40
36
  self.active_steps = []
41
-
42
- if emitter:
43
- self.emitter = emitter
44
- elif isinstance(self.session, HTTPSession):
37
+ if isinstance(self.session, HTTPSession):
45
38
  self.emitter = BaseChainlitEmitter(self.session)
46
39
  elif isinstance(self.session, WebsocketSession):
47
40
  self.emitter = ChainlitEmitter(self.session)
@@ -63,20 +56,15 @@ def init_ws_context(session_or_sid: Union[WebsocketSession, str]) -> ChainlitCon
63
56
 
64
57
 
65
58
  def init_http_context(
66
- thread_id: Optional[str] = None,
67
59
  user: Optional[Union["User", "PersistedUser"]] = None,
68
60
  auth_token: Optional[str] = None,
69
61
  user_env: Optional[Dict[str, str]] = None,
70
- client_type: ClientType = "webapp",
71
62
  ) -> ChainlitContext:
72
- session_id = str(uuid.uuid4())
73
- thread_id = thread_id or str(uuid.uuid4())
74
63
  session = HTTPSession(
75
- id=session_id,
76
- thread_id=thread_id,
64
+ id=str(uuid.uuid4()),
77
65
  token=auth_token,
78
66
  user=user,
79
- client_type=client_type,
67
+ client_type="app",
80
68
  user_env=user_env,
81
69
  )
82
70
  context = ChainlitContext(session)