update chainlit version
Browse files- .chainlit/config.toml +1 -1
- .chainlit/translations/en-US.json +229 -0
- .gitignore +2 -1
- Dockerfile +23 -5
- app.py +1 -1
- requirements.txt +7 -5
- starters.py +3 -3
.chainlit/config.toml
CHANGED
@@ -15,7 +15,7 @@ cache = false
|
|
15 |
# follow_symlink = false
|
16 |
|
17 |
# Path to the starters file
|
18 |
-
starters_file = "starters.py"
|
19 |
|
20 |
[features]
|
21 |
# Show the prompt playground
|
|
|
15 |
# follow_symlink = false
|
16 |
|
17 |
# Path to the starters file
|
18 |
+
# starters_file = "starters.py"
|
19 |
|
20 |
[features]
|
21 |
# Show the prompt playground
|
.chainlit/translations/en-US.json
ADDED
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"components": {
|
3 |
+
"atoms": {
|
4 |
+
"buttons": {
|
5 |
+
"userButton": {
|
6 |
+
"menu": {
|
7 |
+
"settings": "Settings",
|
8 |
+
"settingsKey": "S",
|
9 |
+
"APIKeys": "API Keys",
|
10 |
+
"logout": "Logout"
|
11 |
+
}
|
12 |
+
}
|
13 |
+
}
|
14 |
+
},
|
15 |
+
"molecules": {
|
16 |
+
"newChatButton": {
|
17 |
+
"newChat": "New Chat"
|
18 |
+
},
|
19 |
+
"tasklist": {
|
20 |
+
"TaskList": {
|
21 |
+
"title": "\ud83d\uddd2\ufe0f Task List",
|
22 |
+
"loading": "Loading...",
|
23 |
+
"error": "An error occurred"
|
24 |
+
}
|
25 |
+
},
|
26 |
+
"attachments": {
|
27 |
+
"cancelUpload": "Cancel upload",
|
28 |
+
"removeAttachment": "Remove attachment"
|
29 |
+
},
|
30 |
+
"newChatDialog": {
|
31 |
+
"createNewChat": "Create new chat?",
|
32 |
+
"clearChat": "This will clear the current messages and start a new chat.",
|
33 |
+
"cancel": "Cancel",
|
34 |
+
"confirm": "Confirm"
|
35 |
+
},
|
36 |
+
"settingsModal": {
|
37 |
+
"settings": "Settings",
|
38 |
+
"expandMessages": "Expand Messages",
|
39 |
+
"hideChainOfThought": "Hide Chain of Thought",
|
40 |
+
"darkMode": "Dark Mode"
|
41 |
+
},
|
42 |
+
"detailsButton": {
|
43 |
+
"using": "Using",
|
44 |
+
"used": "Used"
|
45 |
+
},
|
46 |
+
"auth": {
|
47 |
+
"authLogin": {
|
48 |
+
"title": "Login to access the app.",
|
49 |
+
"form": {
|
50 |
+
"email": "Email address",
|
51 |
+
"password": "Password",
|
52 |
+
"noAccount": "Don't have an account?",
|
53 |
+
"alreadyHaveAccount": "Already have an account?",
|
54 |
+
"signup": "Sign Up",
|
55 |
+
"signin": "Sign In",
|
56 |
+
"or": "OR",
|
57 |
+
"continue": "Continue",
|
58 |
+
"forgotPassword": "Forgot password?",
|
59 |
+
"passwordMustContain": "Your password must contain:",
|
60 |
+
"emailRequired": "email is a required field",
|
61 |
+
"passwordRequired": "password is a required field"
|
62 |
+
},
|
63 |
+
"error": {
|
64 |
+
"default": "Unable to sign in.",
|
65 |
+
"signin": "Try signing in with a different account.",
|
66 |
+
"oauthsignin": "Try signing in with a different account.",
|
67 |
+
"redirect_uri_mismatch": "The redirect URI is not matching the oauth app configuration.",
|
68 |
+
"oauthcallbackerror": "Try signing in with a different account.",
|
69 |
+
"oauthcreateaccount": "Try signing in with a different account.",
|
70 |
+
"emailcreateaccount": "Try signing in with a different account.",
|
71 |
+
"callback": "Try signing in with a different account.",
|
72 |
+
"oauthaccountnotlinked": "To confirm your identity, sign in with the same account you used originally.",
|
73 |
+
"emailsignin": "The e-mail could not be sent.",
|
74 |
+
"emailverify": "Please verify your email, a new email has been sent.",
|
75 |
+
"credentialssignin": "Sign in failed. Check the details you provided are correct.",
|
76 |
+
"sessionrequired": "Please sign in to access this page."
|
77 |
+
}
|
78 |
+
},
|
79 |
+
"authVerifyEmail": {
|
80 |
+
"almostThere": "You're almost there! We've sent an email to ",
|
81 |
+
"verifyEmailLink": "Please click on the link in that email to complete your signup.",
|
82 |
+
"didNotReceive": "Can't find the email?",
|
83 |
+
"resendEmail": "Resend email",
|
84 |
+
"goBack": "Go Back",
|
85 |
+
"emailSent": "Email sent successfully.",
|
86 |
+
"verifyEmail": "Verify your email address"
|
87 |
+
},
|
88 |
+
"providerButton": {
|
89 |
+
"continue": "Continue with {{provider}}",
|
90 |
+
"signup": "Sign up with {{provider}}"
|
91 |
+
},
|
92 |
+
"authResetPassword": {
|
93 |
+
"newPasswordRequired": "New password is a required field",
|
94 |
+
"passwordsMustMatch": "Passwords must match",
|
95 |
+
"confirmPasswordRequired": "Confirm password is a required field",
|
96 |
+
"newPassword": "New password",
|
97 |
+
"confirmPassword": "Confirm password",
|
98 |
+
"resetPassword": "Reset Password"
|
99 |
+
},
|
100 |
+
"authForgotPassword": {
|
101 |
+
"email": "Email address",
|
102 |
+
"emailRequired": "email is a required field",
|
103 |
+
"emailSent": "Please check the email address {{email}} for instructions to reset your password.",
|
104 |
+
"enterEmail": "Enter your email address and we will send you instructions to reset your password.",
|
105 |
+
"resendEmail": "Resend email",
|
106 |
+
"continue": "Continue",
|
107 |
+
"goBack": "Go Back"
|
108 |
+
}
|
109 |
+
}
|
110 |
+
},
|
111 |
+
"organisms": {
|
112 |
+
"chat": {
|
113 |
+
"history": {
|
114 |
+
"index": {
|
115 |
+
"showHistory": "Show history",
|
116 |
+
"lastInputs": "Last Inputs",
|
117 |
+
"noInputs": "Such empty...",
|
118 |
+
"loading": "Loading..."
|
119 |
+
}
|
120 |
+
},
|
121 |
+
"inputBox": {
|
122 |
+
"input": {
|
123 |
+
"placeholder": "Type your message here..."
|
124 |
+
},
|
125 |
+
"speechButton": {
|
126 |
+
"start": "Start recording",
|
127 |
+
"stop": "Stop recording"
|
128 |
+
},
|
129 |
+
"SubmitButton": {
|
130 |
+
"sendMessage": "Send message",
|
131 |
+
"stopTask": "Stop Task"
|
132 |
+
},
|
133 |
+
"UploadButton": {
|
134 |
+
"attachFiles": "Attach files"
|
135 |
+
},
|
136 |
+
"waterMark": {
|
137 |
+
"text": "Built with"
|
138 |
+
}
|
139 |
+
},
|
140 |
+
"Messages": {
|
141 |
+
"index": {
|
142 |
+
"running": "Running",
|
143 |
+
"executedSuccessfully": "executed successfully",
|
144 |
+
"failed": "failed",
|
145 |
+
"feedbackUpdated": "Feedback updated",
|
146 |
+
"updating": "Updating"
|
147 |
+
}
|
148 |
+
},
|
149 |
+
"dropScreen": {
|
150 |
+
"dropYourFilesHere": "Drop your files here"
|
151 |
+
},
|
152 |
+
"index": {
|
153 |
+
"failedToUpload": "Failed to upload",
|
154 |
+
"cancelledUploadOf": "Cancelled upload of",
|
155 |
+
"couldNotReachServer": "Could not reach the server",
|
156 |
+
"continuingChat": "Continuing previous chat"
|
157 |
+
},
|
158 |
+
"settings": {
|
159 |
+
"settingsPanel": "Settings panel",
|
160 |
+
"reset": "Reset",
|
161 |
+
"cancel": "Cancel",
|
162 |
+
"confirm": "Confirm"
|
163 |
+
}
|
164 |
+
},
|
165 |
+
"threadHistory": {
|
166 |
+
"sidebar": {
|
167 |
+
"filters": {
|
168 |
+
"FeedbackSelect": {
|
169 |
+
"feedbackAll": "Feedback: All",
|
170 |
+
"feedbackPositive": "Feedback: Positive",
|
171 |
+
"feedbackNegative": "Feedback: Negative"
|
172 |
+
},
|
173 |
+
"SearchBar": {
|
174 |
+
"search": "Search"
|
175 |
+
}
|
176 |
+
},
|
177 |
+
"DeleteThreadButton": {
|
178 |
+
"confirmMessage": "This will delete the thread as well as it's messages and elements.",
|
179 |
+
"cancel": "Cancel",
|
180 |
+
"confirm": "Confirm",
|
181 |
+
"deletingChat": "Deleting chat",
|
182 |
+
"chatDeleted": "Chat deleted"
|
183 |
+
},
|
184 |
+
"index": {
|
185 |
+
"pastChats": "Past Chats"
|
186 |
+
},
|
187 |
+
"ThreadList": {
|
188 |
+
"empty": "Empty...",
|
189 |
+
"today": "Today",
|
190 |
+
"yesterday": "Yesterday",
|
191 |
+
"previous7days": "Previous 7 days",
|
192 |
+
"previous30days": "Previous 30 days"
|
193 |
+
},
|
194 |
+
"TriggerButton": {
|
195 |
+
"closeSidebar": "Close sidebar",
|
196 |
+
"openSidebar": "Open sidebar"
|
197 |
+
}
|
198 |
+
},
|
199 |
+
"Thread": {
|
200 |
+
"backToChat": "Go back to chat",
|
201 |
+
"chatCreatedOn": "This chat was created on"
|
202 |
+
}
|
203 |
+
},
|
204 |
+
"header": {
|
205 |
+
"chat": "Chat",
|
206 |
+
"readme": "Readme"
|
207 |
+
}
|
208 |
+
}
|
209 |
+
},
|
210 |
+
"hooks": {
|
211 |
+
"useLLMProviders": {
|
212 |
+
"failedToFetchProviders": "Failed to fetch providers:"
|
213 |
+
}
|
214 |
+
},
|
215 |
+
"pages": {
|
216 |
+
"Design": {},
|
217 |
+
"Env": {
|
218 |
+
"savedSuccessfully": "Saved successfully",
|
219 |
+
"requiredApiKeys": "Required API Keys",
|
220 |
+
"requiredApiKeysInfo": "To use this app, the following API keys are required. The keys are stored on your device's local storage."
|
221 |
+
},
|
222 |
+
"Page": {
|
223 |
+
"notPartOfProject": "You are not part of this project."
|
224 |
+
},
|
225 |
+
"ResumeButton": {
|
226 |
+
"resumeChat": "Resume Chat"
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
.gitignore
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
.env
|
2 |
.venv/
|
3 |
-
__pycache__/
|
|
|
|
1 |
.env
|
2 |
.venv/
|
3 |
+
__pycache__/
|
4 |
+
*.pyc
|
Dockerfile
CHANGED
@@ -1,11 +1,29 @@
|
|
1 |
-
|
|
|
|
|
|
|
2 |
RUN useradd -m -u 1000 user
|
3 |
-
|
|
|
4 |
ENV HOME=/home/user \
|
5 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
6 |
WORKDIR $HOME/app
|
|
|
|
|
|
|
7 |
COPY --chown=user . $HOME/app
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
1 |
+
# Start with the official Python image
|
2 |
+
FROM python:3.11
|
3 |
+
|
4 |
+
# Create a user and set up permissions
|
5 |
RUN useradd -m -u 1000 user
|
6 |
+
|
7 |
+
# Set environment variables
|
8 |
ENV HOME=/home/user \
|
9 |
PATH=/home/user/.local/bin:$PATH
|
10 |
+
|
11 |
+
# Create the app directory and set permissions before switching to the non-root user
|
12 |
WORKDIR $HOME/app
|
13 |
+
RUN mkdir -p $HOME/app/.files && chown -R user:user $HOME/app
|
14 |
+
|
15 |
+
# Copy files as root and set ownership
|
16 |
COPY --chown=user . $HOME/app
|
17 |
+
|
18 |
+
# Switch to the non-root user
|
19 |
+
USER user
|
20 |
+
|
21 |
+
# Copy the requirements file and install dependencies
|
22 |
+
COPY --chown=user requirements.txt $HOME/app/requirements.txt
|
23 |
+
RUN pip install --user -r requirements.txt
|
24 |
+
|
25 |
+
# Copy the rest of the application files
|
26 |
+
COPY --chown=user . .
|
27 |
+
|
28 |
+
# Define the command to run the application
|
29 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
app.py
CHANGED
@@ -11,7 +11,7 @@ from langchain.schema.output_parser import StrOutputParser
|
|
11 |
from langchain.schema.runnable import RunnablePassthrough
|
12 |
from langchain.schema.runnable.config import RunnableConfig
|
13 |
|
14 |
-
import
|
15 |
|
16 |
load_dotenv()
|
17 |
|
|
|
11 |
from langchain.schema.runnable import RunnablePassthrough
|
12 |
from langchain.schema.runnable.config import RunnableConfig
|
13 |
|
14 |
+
from starters import set_starters
|
15 |
|
16 |
load_dotenv()
|
17 |
|
requirements.txt
CHANGED
@@ -7,13 +7,14 @@ asyncer==0.0.2
|
|
7 |
attrs==23.2.0
|
8 |
bidict==0.23.1
|
9 |
certifi==2024.6.2
|
10 |
-
chainlit==
|
11 |
charset-normalizer==3.3.2
|
|
|
12 |
click==8.1.7
|
13 |
dataclasses-json==0.5.14
|
14 |
Deprecated==1.2.14
|
15 |
distro==1.9.0
|
16 |
-
fastapi==0.
|
17 |
fastapi-socketio==0.0.10
|
18 |
filetype==1.2.0
|
19 |
frozenlist==1.4.1
|
@@ -41,6 +42,7 @@ langchain-text-splitters==0.2.1
|
|
41 |
langchainhub==0.1.20
|
42 |
langsmith==0.1.81
|
43 |
Lazify==0.4.0
|
|
|
44 |
marshmallow==3.21.3
|
45 |
multidict==6.0.5
|
46 |
mypy-extensions==1.0.0
|
@@ -66,7 +68,7 @@ PyJWT==2.8.0
|
|
66 |
python-dotenv==1.0.1
|
67 |
python-engineio==4.9.1
|
68 |
python-graphql-client==0.4.3
|
69 |
-
python-multipart==0.0.
|
70 |
python-socketio==5.11.3
|
71 |
PyYAML==6.0.1
|
72 |
qdrant-client==1.9.1
|
@@ -75,7 +77,7 @@ requests==2.32.3
|
|
75 |
simple-websocket==1.0.0
|
76 |
sniffio==1.3.1
|
77 |
SQLAlchemy==2.0.31
|
78 |
-
starlette==0.
|
79 |
syncer==2.0.3
|
80 |
tenacity==8.4.1
|
81 |
tiktoken==0.7.0
|
@@ -86,7 +88,7 @@ typing-inspect==0.9.0
|
|
86 |
typing_extensions==4.12.2
|
87 |
uptrace==1.24.0
|
88 |
urllib3==2.2.2
|
89 |
-
uvicorn==0.
|
90 |
watchfiles==0.20.0
|
91 |
websockets==12.0
|
92 |
wrapt==1.16.0
|
|
|
7 |
attrs==23.2.0
|
8 |
bidict==0.23.1
|
9 |
certifi==2024.6.2
|
10 |
+
chainlit==1.1.302
|
11 |
charset-normalizer==3.3.2
|
12 |
+
chevron==0.14.0
|
13 |
click==8.1.7
|
14 |
dataclasses-json==0.5.14
|
15 |
Deprecated==1.2.14
|
16 |
distro==1.9.0
|
17 |
+
fastapi==0.110.3
|
18 |
fastapi-socketio==0.0.10
|
19 |
filetype==1.2.0
|
20 |
frozenlist==1.4.1
|
|
|
42 |
langchainhub==0.1.20
|
43 |
langsmith==0.1.81
|
44 |
Lazify==0.4.0
|
45 |
+
literalai==0.0.604
|
46 |
marshmallow==3.21.3
|
47 |
multidict==6.0.5
|
48 |
mypy-extensions==1.0.0
|
|
|
68 |
python-dotenv==1.0.1
|
69 |
python-engineio==4.9.1
|
70 |
python-graphql-client==0.4.3
|
71 |
+
python-multipart==0.0.9
|
72 |
python-socketio==5.11.3
|
73 |
PyYAML==6.0.1
|
74 |
qdrant-client==1.9.1
|
|
|
77 |
simple-websocket==1.0.0
|
78 |
sniffio==1.3.1
|
79 |
SQLAlchemy==2.0.31
|
80 |
+
starlette==0.37.2
|
81 |
syncer==2.0.3
|
82 |
tenacity==8.4.1
|
83 |
tiktoken==0.7.0
|
|
|
88 |
typing_extensions==4.12.2
|
89 |
uptrace==1.24.0
|
90 |
urllib3==2.2.2
|
91 |
+
uvicorn==0.25.0
|
92 |
watchfiles==0.20.0
|
93 |
websockets==12.0
|
94 |
wrapt==1.16.0
|
starters.py
CHANGED
@@ -4,15 +4,15 @@ import chainlit as cl
|
|
4 |
async def set_starters():
|
5 |
return [
|
6 |
cl.Starter(
|
7 |
-
label="Description of Business",
|
8 |
message="What is Airbnb's 'Description of Business'?",
|
9 |
),
|
10 |
cl.Starter(
|
11 |
-
label="Cash and
|
12 |
message="What was the total value of 'Cash and cash equivalents' as of December 31, 2023?",
|
13 |
),
|
14 |
cl.Starter(
|
15 |
-
label="Max
|
16 |
message="What is the 'maximum number of shares to be sold under the 10b5-1 Trading plan' by Brian Chesky?",
|
17 |
),
|
18 |
]
|
|
|
4 |
async def set_starters():
|
5 |
return [
|
6 |
cl.Starter(
|
7 |
+
label="π Description of AirBnBs Business",
|
8 |
message="What is Airbnb's 'Description of Business'?",
|
9 |
),
|
10 |
cl.Starter(
|
11 |
+
label="π΅ Cash and Cash Equivalents",
|
12 |
message="What was the total value of 'Cash and cash equivalents' as of December 31, 2023?",
|
13 |
),
|
14 |
cl.Starter(
|
15 |
+
label="π Max Shares for Sale by Chesky",
|
16 |
message="What is the 'maximum number of shares to be sold under the 10b5-1 Trading plan' by Brian Chesky?",
|
17 |
),
|
18 |
]
|