chainlit 2.0rc1__tar.gz → 2.0.1__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.
- {chainlit-2.0rc1 → chainlit-2.0.1}/PKG-INFO +3 -34
- {chainlit-2.0rc1 → chainlit-2.0.1}/README.md +1 -31
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/__init__.py +47 -57
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/action.py +8 -8
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/auth/__init__.py +1 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/auth/cookie.py +0 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/callbacks.py +1 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/config.py +8 -59
- chainlit-2.0.1/chainlit/copilot/dist/index.js +12200 -0
- chainlit-2.0.1/chainlit/data/__init__.py +113 -0
- chainlit-2.0.1/chainlit/data/chainlit_data_layer.py +584 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/literalai.py +1 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/sql_alchemy.py +2 -2
- chainlit-2.0.1/chainlit/data/storage_clients/azure_blob.py +80 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/storage_clients/base.py +6 -0
- chainlit-2.0.1/chainlit/data/storage_clients/gcs.py +78 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/storage_clients/s3.py +15 -3
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/element.py +7 -4
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/emitter.py +1 -14
- chainlit-2.0rc1/chainlit/frontend/dist/assets/DailyMotion-C-_sjrtO.js → chainlit-2.0.1/chainlit/frontend/dist/assets/DailyMotion-B8XgmoRm.js +1 -1
- chainlit-2.0.1/chainlit/frontend/dist/assets/Dataframe-VU4lXMbv.js +22 -0
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Facebook-bB34P03l.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Facebook-fVIMi9h_.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/FilePlayer-BWgqGrXv.js → chainlit-2.0.1/chainlit/frontend/dist/assets/FilePlayer-DlXvvaZa.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Kaltura-OY4P9Ofd.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Kaltura-C48Ui_4V.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Mixcloud-9CtT8w5Y.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Mixcloud-Dmjz7RrS.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Mux-BH9A0qEi.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Mux-Bqaa3ZzG.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Preview-Og00EJ05.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Preview-B2d1Ugq4.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/SoundCloud-D7resGfn.js → chainlit-2.0.1/chainlit/frontend/dist/assets/SoundCloud-BGuk87T3.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Streamable-6f_6bYz1.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Streamable-DOe4rXrG.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Twitch-BZJl3peM.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Twitch-TA7I2UEi.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Vidyard-B7tv4b8_.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Vidyard-B5F6Dk_y.js +1 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Vimeo-F-eA4zQI.js → chainlit-2.0.1/chainlit/frontend/dist/assets/Vimeo-DP_Y98tQ.js +1 -1
- chainlit-2.0.1/chainlit/frontend/dist/assets/Wistia-DB26BTg8.js +1 -0
- chainlit-2.0rc1/chainlit/frontend/dist/assets/YouTube-aFdJGjI1.js → chainlit-2.0.1/chainlit/frontend/dist/assets/YouTube-CMwwf2TN.js +1 -1
- chainlit-2.0.1/chainlit/frontend/dist/assets/index-88S3ZtD5.css +1 -0
- chainlit-2.0.1/chainlit/frontend/dist/assets/index-D7lZEN9m.js +8665 -0
- chainlit-2.0rc1/chainlit/frontend/dist/assets/react-plotly-DoUJXMgz.js → chainlit-2.0.1/chainlit/frontend/dist/assets/react-plotly-28_xImPF.js +1 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/frontend/dist/index.html +2 -2
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/message.py +0 -2
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/server.py +275 -67
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/socket.py +1 -53
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/step.py +0 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/en-US.json +1 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/types.py +17 -3
- {chainlit-2.0rc1 → chainlit-2.0.1}/pyproject.toml +6 -4
- chainlit-2.0rc1/chainlit/copilot/dist/index.js +0 -4900
- chainlit-2.0rc1/chainlit/data/__init__.py +0 -44
- chainlit-2.0rc1/chainlit/frontend/dist/assets/Wistia-Dhxhn3IB.js +0 -1
- chainlit-2.0rc1/chainlit/frontend/dist/assets/index-Ba33_hdJ.js +0 -1091
- chainlit-2.0rc1/chainlit/frontend/dist/assets/index-CwmincdQ.css +0 -1
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/__main__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/_utils.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/auth/jwt.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/cache.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/chat_context.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/chat_settings.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/cli/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/context.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/copilot/dist/assets/logo_dark-IkGJ_IwC.svg +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/copilot/dist/assets/logo_light-Bb_IPh6r.svg +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/acl.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/base.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/dynamodb.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/storage_clients/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/storage_clients/azure.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/data/utils.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/discord/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/discord/app.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/frontend/dist/assets/logo_dark-IkGJ_IwC.svg +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/frontend/dist/assets/logo_light-Bb_IPh6r.svg +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/frontend/dist/favicon.svg +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/haystack/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/haystack/callbacks.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/hello.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/input_widget.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/langchain/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/langchain/callbacks.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/langflow/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/llama_index/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/llama_index/callbacks.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/logger.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/markdown.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/mistralai/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/oauth_providers.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/openai/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/py.typed +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/secret.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/session.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/slack/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/slack/app.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/sync.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/teams/__init__.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/teams/app.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/telemetry.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/bn.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/gu.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/he-IL.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/hi.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/kn.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/ml.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/mr.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/nl-NL.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/ta.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/te.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations/zh-CN.json +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/translations.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/user.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/user_session.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/utils.py +0 -0
- {chainlit-2.0rc1 → chainlit-2.0.1}/chainlit/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: chainlit
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Build Conversational AI.
|
|
5
5
|
Home-page: https://chainlit.io/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -30,12 +30,11 @@ Requires-Dist: httpx (>=0.23.0)
|
|
|
30
30
|
Requires-Dist: lazify (>=0.4.0,<0.5.0)
|
|
31
31
|
Requires-Dist: literalai (==0.0.623)
|
|
32
32
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
|
33
|
-
Requires-Dist: numpy (>=1.26,<2.0)
|
|
34
33
|
Requires-Dist: packaging (>=23.1,<24.0)
|
|
35
34
|
Requires-Dist: pydantic (>=1,<3)
|
|
36
35
|
Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
|
|
37
36
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
38
|
-
Requires-Dist: python-multipart (>=0.0.
|
|
37
|
+
Requires-Dist: python-multipart (>=0.0.18,<0.0.19)
|
|
39
38
|
Requires-Dist: python-socketio (>=5.11.0,<6.0.0)
|
|
40
39
|
Requires-Dist: starlette (>=0.41.2,<0.42.0)
|
|
41
40
|
Requires-Dist: syncer (>=2.0.3,<3.0.0)
|
|
@@ -59,22 +58,10 @@ Description-Content-Type: text/markdown
|
|
|
59
58
|
|
|
60
59
|
Chainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.
|
|
61
60
|
|
|
62
|
-
- ✅ ChatGPT-like application
|
|
63
|
-
- ✅ Embedded Chatbot & Software Copilot
|
|
64
|
-
- ✅ Slack & Discord
|
|
65
|
-
- ✅ Custom frontend (build your own agentic experience)
|
|
66
|
-
- ✅ API Endpoint
|
|
67
|
-
|
|
68
61
|
Full documentation is available [here](https://docs.chainlit.io). You can ask Chainlit related questions to [Chainlit Help](https://help.chainlit.io/), an app built using Chainlit!
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
> Check out [Literal AI](https://literalai.com), our product to monitor and evaluate LLM applications! It works with any Python or TypeScript applications and [seamlessly](https://docs.chainlit.io/data-persistence/overview) with Chainlit by adding a `LITERAL_API_KEY` in your project.
|
|
72
|
-
>
|
|
73
|
-
> Chainlit is developed and maintained by the Literal AI team, which is currently focused on expanding the capabilities of Literal AI. While we continue to support and maintain Chainlit, we are also committed to enabling the community to contribute, particularly in areas like integrations and data layers.
|
|
63
|
+
https://github.com/user-attachments/assets/b3738aba-55c0-42fa-ac00-6efd1ee0d148
|
|
74
64
|
|
|
75
|
-
<p align="center">
|
|
76
|
-
<img src="https://github.com/Chainlit/chainlit/assets/13104895/0c2cc7a9-766c-41d3-aae2-117a2d0eb8ed" alt="Chainlit user interface" width="80%"></img>
|
|
77
|
-
</p>
|
|
78
65
|
|
|
79
66
|
## Installation
|
|
80
67
|
|
|
@@ -142,24 +129,6 @@ chainlit run demo.py -w
|
|
|
142
129
|
|
|
143
130
|
<img src="/images/quick-start.png" alt="Quick Start"></img>
|
|
144
131
|
|
|
145
|
-
## 🎉 Key Features and Integrations
|
|
146
|
-
|
|
147
|
-
Full documentation is available [here](https://docs.chainlit.io). Key features:
|
|
148
|
-
|
|
149
|
-
- [💬 Multi Modal chats](https://docs.chainlit.io/advanced-features/multi-modal)
|
|
150
|
-
- [💭 Chain of Thought visualization](https://docs.chainlit.io/concepts/step)
|
|
151
|
-
- [💾 Data persistence + human feedback](https://docs.chainlit.io/data-persistence/overview)
|
|
152
|
-
- [🐛 Debug Mode](https://docs.chainlit.io/data-persistence/enterprise#debug-mode)
|
|
153
|
-
- [👤 Authentication](https://docs.chainlit.io/authentication/overview)
|
|
154
|
-
|
|
155
|
-
Chainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:
|
|
156
|
-
|
|
157
|
-
- [LangChain](https://docs.chainlit.io/integrations/langchain)
|
|
158
|
-
- [Llama Index](https://docs.chainlit.io/integrations/llama-index)
|
|
159
|
-
- [Autogen](https://github.com/Chainlit/cookbook/tree/main/pyautogen)
|
|
160
|
-
- [OpenAI Assistant](https://github.com/Chainlit/cookbook/tree/main/openai-assistant)
|
|
161
|
-
- [Haystack](https://docs.chainlit.io/integrations/haystack)
|
|
162
|
-
|
|
163
132
|
## 📚 More Examples - Cookbook
|
|
164
133
|
|
|
165
134
|
You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.
|
|
@@ -10,22 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
Chainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.
|
|
12
12
|
|
|
13
|
-
- ✅ ChatGPT-like application
|
|
14
|
-
- ✅ Embedded Chatbot & Software Copilot
|
|
15
|
-
- ✅ Slack & Discord
|
|
16
|
-
- ✅ Custom frontend (build your own agentic experience)
|
|
17
|
-
- ✅ API Endpoint
|
|
18
|
-
|
|
19
13
|
Full documentation is available [here](https://docs.chainlit.io). You can ask Chainlit related questions to [Chainlit Help](https://help.chainlit.io/), an app built using Chainlit!
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
> Check out [Literal AI](https://literalai.com), our product to monitor and evaluate LLM applications! It works with any Python or TypeScript applications and [seamlessly](https://docs.chainlit.io/data-persistence/overview) with Chainlit by adding a `LITERAL_API_KEY` in your project.
|
|
23
|
-
>
|
|
24
|
-
> Chainlit is developed and maintained by the Literal AI team, which is currently focused on expanding the capabilities of Literal AI. While we continue to support and maintain Chainlit, we are also committed to enabling the community to contribute, particularly in areas like integrations and data layers.
|
|
15
|
+
https://github.com/user-attachments/assets/b3738aba-55c0-42fa-ac00-6efd1ee0d148
|
|
25
16
|
|
|
26
|
-
<p align="center">
|
|
27
|
-
<img src="https://github.com/Chainlit/chainlit/assets/13104895/0c2cc7a9-766c-41d3-aae2-117a2d0eb8ed" alt="Chainlit user interface" width="80%"></img>
|
|
28
|
-
</p>
|
|
29
17
|
|
|
30
18
|
## Installation
|
|
31
19
|
|
|
@@ -93,24 +81,6 @@ chainlit run demo.py -w
|
|
|
93
81
|
|
|
94
82
|
<img src="/images/quick-start.png" alt="Quick Start"></img>
|
|
95
83
|
|
|
96
|
-
## 🎉 Key Features and Integrations
|
|
97
|
-
|
|
98
|
-
Full documentation is available [here](https://docs.chainlit.io). Key features:
|
|
99
|
-
|
|
100
|
-
- [💬 Multi Modal chats](https://docs.chainlit.io/advanced-features/multi-modal)
|
|
101
|
-
- [💭 Chain of Thought visualization](https://docs.chainlit.io/concepts/step)
|
|
102
|
-
- [💾 Data persistence + human feedback](https://docs.chainlit.io/data-persistence/overview)
|
|
103
|
-
- [🐛 Debug Mode](https://docs.chainlit.io/data-persistence/enterprise#debug-mode)
|
|
104
|
-
- [👤 Authentication](https://docs.chainlit.io/authentication/overview)
|
|
105
|
-
|
|
106
|
-
Chainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:
|
|
107
|
-
|
|
108
|
-
- [LangChain](https://docs.chainlit.io/integrations/langchain)
|
|
109
|
-
- [Llama Index](https://docs.chainlit.io/integrations/llama-index)
|
|
110
|
-
- [Autogen](https://github.com/Chainlit/cookbook/tree/main/pyautogen)
|
|
111
|
-
- [OpenAI Assistant](https://github.com/Chainlit/cookbook/tree/main/openai-assistant)
|
|
112
|
-
- [Haystack](https://docs.chainlit.io/integrations/haystack)
|
|
113
|
-
|
|
114
84
|
## 📚 More Examples - Cookbook
|
|
115
85
|
|
|
116
86
|
You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.
|
|
@@ -25,7 +25,7 @@ from chainlit.chat_settings import ChatSettings
|
|
|
25
25
|
from chainlit.context import context
|
|
26
26
|
from chainlit.element import (
|
|
27
27
|
Audio,
|
|
28
|
-
|
|
28
|
+
CustomElement,
|
|
29
29
|
Dataframe,
|
|
30
30
|
File,
|
|
31
31
|
Image,
|
|
@@ -117,83 +117,73 @@ __getattr__ = make_module_getattr(
|
|
|
117
117
|
)
|
|
118
118
|
|
|
119
119
|
__all__ = [
|
|
120
|
-
"
|
|
120
|
+
"Action",
|
|
121
|
+
"AskActionMessage",
|
|
122
|
+
"AskFileMessage",
|
|
123
|
+
"AskUserMessage",
|
|
124
|
+
"AsyncLangchainCallbackHandler",
|
|
125
|
+
"Audio",
|
|
126
|
+
"ChatGeneration",
|
|
121
127
|
"ChatProfile",
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"chat_context",
|
|
128
|
+
"ChatSettings",
|
|
129
|
+
"CompletionGeneration",
|
|
125
130
|
"CopilotFunction",
|
|
131
|
+
"CustomElement",
|
|
132
|
+
"Dataframe",
|
|
133
|
+
"ErrorMessage",
|
|
134
|
+
"File",
|
|
135
|
+
"GenerationMessage",
|
|
136
|
+
"HaystackAgentCallbackHandler",
|
|
137
|
+
"Image",
|
|
126
138
|
"InputAudioChunk",
|
|
139
|
+
"LangchainCallbackHandler",
|
|
140
|
+
"LlamaIndexCallbackHandler",
|
|
141
|
+
"Message",
|
|
127
142
|
"OutputAudioChunk",
|
|
128
|
-
"Action",
|
|
129
|
-
"User",
|
|
130
|
-
"PersistedUser",
|
|
131
|
-
"Audio",
|
|
132
143
|
"Pdf",
|
|
144
|
+
"PersistedUser",
|
|
133
145
|
"Plotly",
|
|
134
|
-
"Image",
|
|
135
|
-
"Text",
|
|
136
|
-
"Component",
|
|
137
|
-
"Dataframe",
|
|
138
146
|
"Pyplot",
|
|
139
|
-
"
|
|
147
|
+
"Starter",
|
|
148
|
+
"Step",
|
|
140
149
|
"Task",
|
|
141
150
|
"TaskList",
|
|
142
151
|
"TaskStatus",
|
|
152
|
+
"Text",
|
|
153
|
+
"User",
|
|
143
154
|
"Video",
|
|
144
|
-
"
|
|
145
|
-
"input_widget",
|
|
146
|
-
"Message",
|
|
147
|
-
"ErrorMessage",
|
|
148
|
-
"AskUserMessage",
|
|
149
|
-
"AskActionMessage",
|
|
150
|
-
"AskFileMessage",
|
|
151
|
-
"Step",
|
|
152
|
-
"step",
|
|
153
|
-
"ChatGeneration",
|
|
154
|
-
"CompletionGeneration",
|
|
155
|
-
"GenerationMessage",
|
|
156
|
-
"on_logout",
|
|
157
|
-
"on_window_message",
|
|
158
|
-
"send_window_message",
|
|
159
|
-
"on_chat_start",
|
|
160
|
-
"on_chat_end",
|
|
161
|
-
"on_chat_resume",
|
|
162
|
-
"on_stop",
|
|
155
|
+
"__version__",
|
|
163
156
|
"action_callback",
|
|
164
157
|
"author_rename",
|
|
165
|
-
"on_settings_update",
|
|
166
|
-
"password_auth_callback",
|
|
167
|
-
"header_auth_callback",
|
|
168
|
-
"sleep",
|
|
169
|
-
"run_sync",
|
|
170
|
-
"make_async",
|
|
171
158
|
"cache",
|
|
159
|
+
"chat_context",
|
|
172
160
|
"context",
|
|
173
|
-
"
|
|
174
|
-
"AsyncLangchainCallbackHandler",
|
|
175
|
-
"LlamaIndexCallbackHandler",
|
|
176
|
-
"HaystackAgentCallbackHandler",
|
|
177
|
-
"instrument_openai",
|
|
178
|
-
"instrument_mistralai",
|
|
179
|
-
"password_auth_callback",
|
|
161
|
+
"data_layer",
|
|
180
162
|
"header_auth_callback",
|
|
163
|
+
"input_widget",
|
|
164
|
+
"instrument_mistralai",
|
|
165
|
+
"instrument_openai",
|
|
166
|
+
"make_async",
|
|
181
167
|
"oauth_callback",
|
|
168
|
+
"on_audio_chunk",
|
|
169
|
+
"on_audio_end",
|
|
170
|
+
"on_audio_start",
|
|
171
|
+
"on_chat_end",
|
|
172
|
+
"on_chat_resume",
|
|
173
|
+
"on_chat_start",
|
|
182
174
|
"on_logout",
|
|
183
175
|
"on_message",
|
|
184
|
-
"
|
|
185
|
-
"
|
|
176
|
+
"on_settings_update",
|
|
177
|
+
"on_stop",
|
|
178
|
+
"on_window_message",
|
|
179
|
+
"password_auth_callback",
|
|
180
|
+
"run_sync",
|
|
181
|
+
"send_window_message",
|
|
186
182
|
"set_chat_profiles",
|
|
187
183
|
"set_starters",
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"on_audio_end",
|
|
192
|
-
"author_rename",
|
|
193
|
-
"on_stop",
|
|
194
|
-
"action_callback",
|
|
195
|
-
"on_settings_update",
|
|
196
|
-
"data_layer",
|
|
184
|
+
"sleep",
|
|
185
|
+
"step",
|
|
186
|
+
"user_session",
|
|
197
187
|
]
|
|
198
188
|
|
|
199
189
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import uuid
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Dict, Optional
|
|
3
3
|
|
|
4
4
|
from dataclasses_json import DataClassJsonMixin
|
|
5
5
|
from pydantic import Field
|
|
@@ -13,18 +13,18 @@ from chainlit.telemetry import trace_event
|
|
|
13
13
|
class Action(DataClassJsonMixin):
|
|
14
14
|
# Name of the action, this should be used in the action_callback
|
|
15
15
|
name: str
|
|
16
|
-
# The
|
|
17
|
-
|
|
18
|
-
# The label of the action. This is what the user will see.
|
|
16
|
+
# The parameters to call this action with.
|
|
17
|
+
payload: Dict
|
|
18
|
+
# The label of the action. This is what the user will see.
|
|
19
19
|
label: str = ""
|
|
20
|
-
# The
|
|
21
|
-
|
|
20
|
+
# The tooltip of the action button. This is what the user will see when they hover the action.
|
|
21
|
+
tooltip: str = ""
|
|
22
|
+
# The lucid icon name for this action.
|
|
23
|
+
icon: Optional[str] = None
|
|
22
24
|
# This should not be set manually, only used internally.
|
|
23
25
|
forId: Optional[str] = None
|
|
24
26
|
# The ID of the action
|
|
25
27
|
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
|
|
26
|
-
# Show the action in a drawer menu
|
|
27
|
-
collapsed: bool = False
|
|
28
28
|
|
|
29
29
|
def __post_init__(self) -> None:
|
|
30
30
|
trace_event(f"init {self.__class__.__name__}")
|
|
@@ -38,10 +38,10 @@ def get_configuration():
|
|
|
38
38
|
"requireLogin": require_login(),
|
|
39
39
|
"passwordAuth": config.code.password_auth_callback is not None,
|
|
40
40
|
"headerAuth": config.code.header_auth_callback is not None,
|
|
41
|
-
"cookieAuth": config.project.cookie_auth,
|
|
42
41
|
"oauthProviders": (
|
|
43
42
|
get_configured_oauth_providers() if is_oauth_enabled() else []
|
|
44
43
|
),
|
|
44
|
+
"default_theme": config.ui.default_theme,
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
|
|
@@ -325,7 +325,7 @@ def action_callback(name: str) -> Callable:
|
|
|
325
325
|
"""
|
|
326
326
|
|
|
327
327
|
def decorator(func: Callable[[Action], Any]):
|
|
328
|
-
config.code.action_callbacks[name] = wrap_user_function(func, with_task=
|
|
328
|
+
config.code.action_callbacks[name] = wrap_user_function(func, with_task=False)
|
|
329
329
|
return func
|
|
330
330
|
|
|
331
331
|
return decorator
|
|
@@ -55,6 +55,7 @@ FILES_DIRECTORY = Path(APP_ROOT) / ".files"
|
|
|
55
55
|
FILES_DIRECTORY.mkdir(exist_ok=True)
|
|
56
56
|
|
|
57
57
|
config_dir = os.path.join(APP_ROOT, ".chainlit")
|
|
58
|
+
public_dir = os.path.join(APP_ROOT, "public")
|
|
58
59
|
config_file = os.path.join(config_dir, "config.toml")
|
|
59
60
|
config_translation_dir = os.path.join(config_dir, "translations")
|
|
60
61
|
|
|
@@ -79,9 +80,6 @@ cache = false
|
|
|
79
80
|
# Authorized origins
|
|
80
81
|
allow_origins = ["*"]
|
|
81
82
|
|
|
82
|
-
# Follow symlink for asset mount (see https://github.com/Chainlit/chainlit/issues/317)
|
|
83
|
-
# follow_symlink = false
|
|
84
|
-
|
|
85
83
|
[features]
|
|
86
84
|
# Process and display HTML in messages. This can be a security risk (see https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript)
|
|
87
85
|
unsafe_allow_html = false
|
|
@@ -95,9 +93,6 @@ auto_tag_thread = true
|
|
|
95
93
|
# Allow users to edit their own messages
|
|
96
94
|
edit_message = true
|
|
97
95
|
|
|
98
|
-
# Use httponly cookie for client->server authentication, required to be able to use file upload and elements.
|
|
99
|
-
cookie_auth = true
|
|
100
|
-
|
|
101
96
|
# Authorize users to spontaneously upload files with messages
|
|
102
97
|
[features.spontaneous_file_upload]
|
|
103
98
|
enabled = true
|
|
@@ -113,12 +108,13 @@ cookie_auth = true
|
|
|
113
108
|
# Name of the assistant.
|
|
114
109
|
name = "Assistant"
|
|
115
110
|
|
|
111
|
+
# default_theme = "dark"
|
|
112
|
+
|
|
113
|
+
# layout = "wide"
|
|
114
|
+
|
|
116
115
|
# Description of the assistant. This is used for HTML tags.
|
|
117
116
|
# description = ""
|
|
118
117
|
|
|
119
|
-
# Large size content are by default collapsed for a cleaner ui
|
|
120
|
-
default_collapse_content = true
|
|
121
|
-
|
|
122
118
|
# Chain of Thought (CoT) display mode. Can be "hidden", "tool_call" or "full".
|
|
123
119
|
cot = "full"
|
|
124
120
|
|
|
@@ -133,9 +129,6 @@ cot = "full"
|
|
|
133
129
|
# The Javascript file can be served from the public directory.
|
|
134
130
|
# custom_js = "/public/test.js"
|
|
135
131
|
|
|
136
|
-
# Specify a custom font url.
|
|
137
|
-
# custom_font = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap"
|
|
138
|
-
|
|
139
132
|
# Specify a custom meta image url.
|
|
140
133
|
# custom_meta_image_url = "https://chainlit-cloud.s3.eu-west-3.amazonaws.com/logo/chainlit_banner.png"
|
|
141
134
|
|
|
@@ -144,36 +137,6 @@ cot = "full"
|
|
|
144
137
|
# Be careful: If this is a relative path, it should not start with a slash.
|
|
145
138
|
# custom_build = "./public/build"
|
|
146
139
|
|
|
147
|
-
[UI.theme]
|
|
148
|
-
default = "dark"
|
|
149
|
-
#layout = "wide"
|
|
150
|
-
#font_family = "Inter, sans-serif"
|
|
151
|
-
# Override default MUI light theme. (Check theme.ts)
|
|
152
|
-
[UI.theme.light]
|
|
153
|
-
#background = "#FAFAFA"
|
|
154
|
-
#paper = "#FFFFFF"
|
|
155
|
-
|
|
156
|
-
[UI.theme.light.primary]
|
|
157
|
-
#main = "#F80061"
|
|
158
|
-
#dark = "#980039"
|
|
159
|
-
#light = "#FFE7EB"
|
|
160
|
-
[UI.theme.light.text]
|
|
161
|
-
#primary = "#212121"
|
|
162
|
-
#secondary = "#616161"
|
|
163
|
-
|
|
164
|
-
# Override default MUI dark theme. (Check theme.ts)
|
|
165
|
-
[UI.theme.dark]
|
|
166
|
-
#background = "#FAFAFA"
|
|
167
|
-
#paper = "#FFFFFF"
|
|
168
|
-
|
|
169
|
-
[UI.theme.dark.primary]
|
|
170
|
-
#main = "#F80061"
|
|
171
|
-
#dark = "#980039"
|
|
172
|
-
#light = "#FFE7EB"
|
|
173
|
-
[UI.theme.dark.text]
|
|
174
|
-
#primary = "#EEEEEE"
|
|
175
|
-
#secondary = "#BDBDBD"
|
|
176
|
-
|
|
177
140
|
[meta]
|
|
178
141
|
generated_by = "{__version__}"
|
|
179
142
|
"""
|
|
@@ -221,15 +184,6 @@ class Palette(DataClassJsonMixin):
|
|
|
221
184
|
text: Optional[TextOptions] = None
|
|
222
185
|
|
|
223
186
|
|
|
224
|
-
@dataclass()
|
|
225
|
-
class Theme(DataClassJsonMixin):
|
|
226
|
-
font_family: Optional[str] = None
|
|
227
|
-
default: Optional[Literal["light", "dark"]] = "dark"
|
|
228
|
-
layout: Optional[Literal["default", "wide"]] = "default"
|
|
229
|
-
light: Optional[Palette] = None
|
|
230
|
-
dark: Optional[Palette] = None
|
|
231
|
-
|
|
232
|
-
|
|
233
187
|
@dataclass
|
|
234
188
|
class SpontaneousFileUploadFeature(DataClassJsonMixin):
|
|
235
189
|
enabled: Optional[bool] = None
|
|
@@ -259,14 +213,13 @@ class UISettings(DataClassJsonMixin):
|
|
|
259
213
|
name: str
|
|
260
214
|
description: str = ""
|
|
261
215
|
cot: Literal["hidden", "tool_call", "full"] = "full"
|
|
262
|
-
|
|
263
|
-
|
|
216
|
+
font_family: Optional[str] = None
|
|
217
|
+
default_theme: Optional[Literal["light", "dark"]] = "dark"
|
|
218
|
+
layout: Optional[Literal["default", "wide"]] = "default"
|
|
264
219
|
github: Optional[str] = None
|
|
265
|
-
theme: Optional[Theme] = None
|
|
266
220
|
# Optional custom CSS file that allows you to customize the UI
|
|
267
221
|
custom_css: Optional[str] = None
|
|
268
222
|
custom_js: Optional[str] = None
|
|
269
|
-
custom_font: Optional[str] = None
|
|
270
223
|
# Optional custom meta tag for image preview
|
|
271
224
|
custom_meta_image_url: Optional[str] = None
|
|
272
225
|
# Optional custom build directory for the frontend
|
|
@@ -328,10 +281,6 @@ class ProjectSettings(DataClassJsonMixin):
|
|
|
328
281
|
user_session_timeout: int = 1296000 # 15 days
|
|
329
282
|
# Enable third parties caching (e.g LangChain cache)
|
|
330
283
|
cache: bool = False
|
|
331
|
-
# Follow symlink for asset mount (see https://github.com/Chainlit/chainlit/issues/317)
|
|
332
|
-
follow_symlink: bool = False
|
|
333
|
-
# Use httponly cookie for client->server authentication, required to be able to use file upload and elements.
|
|
334
|
-
cookie_auth: bool = True
|
|
335
284
|
|
|
336
285
|
|
|
337
286
|
@dataclass()
|