chainlit 1.0.400__py3-none-any.whl → 2.0.3__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/__init__.py +98 -279
- chainlit/_utils.py +8 -0
- chainlit/action.py +12 -10
- chainlit/{auth.py → auth/__init__.py} +28 -36
- chainlit/auth/cookie.py +122 -0
- chainlit/auth/jwt.py +39 -0
- chainlit/cache.py +4 -6
- chainlit/callbacks.py +362 -0
- chainlit/chat_context.py +64 -0
- chainlit/chat_settings.py +3 -1
- chainlit/cli/__init__.py +77 -8
- chainlit/config.py +181 -101
- chainlit/context.py +42 -13
- chainlit/copilot/dist/index.js +8750 -903
- chainlit/data/__init__.py +101 -416
- chainlit/data/acl.py +6 -2
- chainlit/data/base.py +107 -0
- chainlit/data/chainlit_data_layer.py +608 -0
- chainlit/data/dynamodb.py +590 -0
- chainlit/data/literalai.py +500 -0
- chainlit/data/sql_alchemy.py +721 -0
- chainlit/data/storage_clients/__init__.py +0 -0
- chainlit/data/storage_clients/azure.py +81 -0
- chainlit/data/storage_clients/azure_blob.py +89 -0
- chainlit/data/storage_clients/base.py +26 -0
- chainlit/data/storage_clients/gcs.py +88 -0
- chainlit/data/storage_clients/s3.py +75 -0
- chainlit/data/utils.py +29 -0
- chainlit/discord/__init__.py +6 -0
- chainlit/discord/app.py +354 -0
- chainlit/element.py +91 -33
- chainlit/emitter.py +80 -29
- chainlit/frontend/dist/assets/DailyMotion-C_XC7xJI.js +1 -0
- chainlit/frontend/dist/assets/Dataframe-Cs4l4hA1.js +22 -0
- chainlit/frontend/dist/assets/Facebook-CUeCH7hk.js +1 -0
- chainlit/frontend/dist/assets/FilePlayer-CB-fYkx8.js +1 -0
- chainlit/frontend/dist/assets/Kaltura-YX6qaq72.js +1 -0
- chainlit/frontend/dist/assets/Mixcloud-DGV0ldjP.js +1 -0
- chainlit/frontend/dist/assets/Mux-CmRss5oc.js +1 -0
- chainlit/frontend/dist/assets/Preview-DBVJn7-H.js +1 -0
- chainlit/frontend/dist/assets/SoundCloud-qLUb18oY.js +1 -0
- chainlit/frontend/dist/assets/Streamable-BvYP7bFp.js +1 -0
- chainlit/frontend/dist/assets/Twitch-CTHt-sGZ.js +1 -0
- chainlit/frontend/dist/assets/Vidyard-B-0mCJbm.js +1 -0
- chainlit/frontend/dist/assets/Vimeo-Dnp7ri8q.js +1 -0
- chainlit/frontend/dist/assets/Wistia-DW0x_UBn.js +1 -0
- chainlit/frontend/dist/assets/YouTube--98FipvA.js +1 -0
- chainlit/frontend/dist/assets/index-D71nZ46o.js +8665 -0
- chainlit/frontend/dist/assets/index-g8LTJwwr.css +1 -0
- chainlit/frontend/dist/assets/react-plotly-Cn_BQTQw.js +3484 -0
- chainlit/frontend/dist/index.html +2 -4
- chainlit/haystack/callbacks.py +4 -7
- chainlit/input_widget.py +8 -4
- chainlit/langchain/callbacks.py +107 -72
- chainlit/langflow/__init__.py +1 -0
- chainlit/llama_index/__init__.py +2 -2
- chainlit/llama_index/callbacks.py +67 -42
- chainlit/markdown.py +22 -6
- chainlit/message.py +54 -56
- chainlit/mistralai/__init__.py +50 -0
- chainlit/oauth_providers.py +266 -8
- chainlit/openai/__init__.py +10 -18
- chainlit/secret.py +1 -1
- chainlit/server.py +789 -228
- chainlit/session.py +108 -90
- chainlit/slack/__init__.py +6 -0
- chainlit/slack/app.py +397 -0
- chainlit/socket.py +199 -116
- chainlit/step.py +141 -89
- chainlit/sync.py +2 -1
- chainlit/teams/__init__.py +6 -0
- chainlit/teams/app.py +338 -0
- chainlit/translations/bn.json +235 -0
- chainlit/translations/en-US.json +83 -4
- chainlit/translations/gu.json +235 -0
- chainlit/translations/he-IL.json +235 -0
- chainlit/translations/hi.json +235 -0
- chainlit/translations/kn.json +235 -0
- chainlit/translations/ml.json +235 -0
- chainlit/translations/mr.json +235 -0
- chainlit/translations/nl-NL.json +233 -0
- chainlit/translations/ta.json +235 -0
- chainlit/translations/te.json +235 -0
- chainlit/translations/zh-CN.json +233 -0
- chainlit/translations.py +60 -0
- chainlit/types.py +133 -28
- chainlit/user.py +14 -3
- chainlit/user_session.py +6 -3
- chainlit/utils.py +52 -5
- chainlit/version.py +3 -2
- {chainlit-1.0.400.dist-info → chainlit-2.0.3.dist-info}/METADATA +48 -50
- chainlit-2.0.3.dist-info/RECORD +106 -0
- chainlit/cli/utils.py +0 -24
- chainlit/frontend/dist/assets/index-9711593e.js +0 -723
- chainlit/frontend/dist/assets/index-d088547c.css +0 -1
- chainlit/frontend/dist/assets/react-plotly-d8762cc2.js +0 -3602
- chainlit/playground/__init__.py +0 -2
- chainlit/playground/config.py +0 -40
- chainlit/playground/provider.py +0 -108
- chainlit/playground/providers/__init__.py +0 -13
- chainlit/playground/providers/anthropic.py +0 -118
- chainlit/playground/providers/huggingface.py +0 -75
- chainlit/playground/providers/langchain.py +0 -89
- chainlit/playground/providers/openai.py +0 -408
- chainlit/playground/providers/vertexai.py +0 -171
- chainlit/translations/pt-BR.json +0 -155
- chainlit-1.0.400.dist-info/RECORD +0 -66
- /chainlit/copilot/dist/assets/{logo_dark-2a3cf740.svg → logo_dark-IkGJ_IwC.svg} +0 -0
- /chainlit/copilot/dist/assets/{logo_light-b078e7bc.svg → logo_light-Bb_IPh6r.svg} +0 -0
- /chainlit/frontend/dist/assets/{logo_dark-2a3cf740.svg → logo_dark-IkGJ_IwC.svg} +0 -0
- /chainlit/frontend/dist/assets/{logo_light-b078e7bc.svg → logo_light-Bb_IPh6r.svg} +0 -0
- {chainlit-1.0.400.dist-info → chainlit-2.0.3.dist-info}/WHEEL +0 -0
- {chainlit-1.0.400.dist-info → chainlit-2.0.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"atoms": {
|
|
4
|
+
"buttons": {
|
|
5
|
+
"userButton": {
|
|
6
|
+
"menu": {
|
|
7
|
+
"settings": "సెట్టింగ్ లు",
|
|
8
|
+
"settingsKey": "S",
|
|
9
|
+
"APIKeys": "API Keys",
|
|
10
|
+
"logout": "Logout"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"molecules": {
|
|
16
|
+
"newChatButton": {
|
|
17
|
+
"newChat": "కొత్త చాట్"
|
|
18
|
+
},
|
|
19
|
+
"tasklist": {
|
|
20
|
+
"TaskList": {
|
|
21
|
+
"title": "🗒️ టాస్క్ లిస్ట్",
|
|
22
|
+
"loading": "లోడింగ్...",
|
|
23
|
+
"error": "ఒక దోషం సంభవించింది"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"attachments": {
|
|
27
|
+
"cancelUpload": "అప్ లోడ్ రద్దు చేయండి",
|
|
28
|
+
"removeAttachment": "అటాచ్ మెంట్ తొలగించు"
|
|
29
|
+
},
|
|
30
|
+
"newChatDialog": {
|
|
31
|
+
"createNewChat": "కొత్త చాట్ సృష్టించాలా?",
|
|
32
|
+
"clearChat": "ఇది ప్రస్తుత సందేశాలను క్లియర్ చేస్తుంది మరియు కొత్త చాట్ను ప్రారంభిస్తుంది.",
|
|
33
|
+
"cancel": "రద్దు",
|
|
34
|
+
"confirm": "ధ్రువపరచు"
|
|
35
|
+
},
|
|
36
|
+
"settingsModal": {
|
|
37
|
+
"settings": "సెట్టింగ్ లు",
|
|
38
|
+
"expandMessages": "సందేశాలను విస్తరించండి",
|
|
39
|
+
"hideChainOfThought": "ఆలోచనా గొలుసును దాచండి",
|
|
40
|
+
"darkMode": "డార్క్ మోడ్"
|
|
41
|
+
},
|
|
42
|
+
"detailsButton": {
|
|
43
|
+
"using": "ఉపయోగించడం",
|
|
44
|
+
"running": "రన్నింగ్",
|
|
45
|
+
"took_one": "{{count}} అడుగు వేసింది",
|
|
46
|
+
"took_other": "{{count}} అడుగులు వేసింది"
|
|
47
|
+
},
|
|
48
|
+
"auth": {
|
|
49
|
+
"authLogin": {
|
|
50
|
+
"title": "యాప్ యాక్సెస్ చేసుకోవడానికి లాగిన్ అవ్వండి.",
|
|
51
|
+
"form": {
|
|
52
|
+
"email": "ఇమెయిల్ చిరునామా",
|
|
53
|
+
"password": "పాస్ వర్డ్",
|
|
54
|
+
"noAccount": "మీకు అకౌంట్ లేదా?",
|
|
55
|
+
"alreadyHaveAccount": "ఇప్పటికే ఖాతా ఉందా?",
|
|
56
|
+
"signup": "సైన్ అప్",
|
|
57
|
+
"signin": "సైన్ ఇన్",
|
|
58
|
+
"or": "లేదా",
|
|
59
|
+
"continue": "కొనసాగు",
|
|
60
|
+
"forgotPassword": "పాస్ వర్డ్ మర్చిపోయారా?",
|
|
61
|
+
"passwordMustContain": "మీ పాస్ వర్డ్ లో ఇవి ఉండాలి:",
|
|
62
|
+
"emailRequired": "ఇమెయిల్ అనేది అవసరమైన ఫీల్డ్",
|
|
63
|
+
"passwordRequired": "పాస్ వర్డ్ అనేది అవసరమైన ఫీల్డ్"
|
|
64
|
+
},
|
|
65
|
+
"error": {
|
|
66
|
+
"default": "సైన్ ఇన్ చేయడం సాధ్యం కాదు.",
|
|
67
|
+
"signin": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
68
|
+
"oauthsignin": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
69
|
+
"redirect_uri_mismatch": "రీడైరెక్ట్ URI ఓయూత్ యాప్ కాన్ఫిగరేషన్ కు సరిపోలడం లేదు.",
|
|
70
|
+
"oauthcallbackerror": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
71
|
+
"oauthcreateaccount": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
72
|
+
"emailcreateaccount": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
73
|
+
"callback": "వేరొక ఖాతాతో సైన్ ఇన్ చేయడానికి ప్రయత్నించండి.",
|
|
74
|
+
"oauthaccountnotlinked": "మీ గుర్తింపును ధృవీకరించడానికి, మీరు మొదట ఉపయోగించిన అదే ఖాతాతో సైన్ ఇన్ చేయండి.",
|
|
75
|
+
"emailsignin": "ఇ-మెయిల్ పంపడం సాధ్యం కాదు.",
|
|
76
|
+
"emailverify": "దయచేసి మీ ఇమెయిల్ ని ధృవీకరించండి, కొత్త ఇమెయిల్ పంపబడింది.",
|
|
77
|
+
"credentialssignin": "సైన్ ఇన్ విఫలమైంది. మీరు అందించిన వివరాలు సరిగ్గా ఉన్నాయో లేదో చెక్ చేసుకోండి.",
|
|
78
|
+
"sessionrequired": "ఈ పేజీని యాక్సెస్ చేయడం కొరకు దయచేసి సైన్ ఇన్ చేయండి."
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"authVerifyEmail": {
|
|
82
|
+
"almostThere": "మీరు దాదాపు అక్కడే ఉన్నారు! మేము దీనికి ఒక ఇమెయిల్ పంపాము ",
|
|
83
|
+
"verifyEmailLink": "మీ సైన్ అప్ పూర్తి చేయడానికి దయచేసి ఆ ఇమెయిల్ లోని లింక్ పై క్లిక్ చేయండి.",
|
|
84
|
+
"didNotReceive": "ఇమెయిల్ ని కనుగొనలేకపోయారా?",
|
|
85
|
+
"resendEmail": "ఇమెయిల్ ని తిరిగి పంపండి",
|
|
86
|
+
"goBack": "వెనక్కి వెళ్ళు",
|
|
87
|
+
"emailSent": "ఇమెయిల్ విజయవంతంగా పంపబడింది.",
|
|
88
|
+
"verifyEmail": "మీ ఇమెయిల్ చిరునామాను ధృవీకరించండి"
|
|
89
|
+
},
|
|
90
|
+
"providerButton": {
|
|
91
|
+
"continue": "{{provider}} తో కొనసాగించండి",
|
|
92
|
+
"signup": "{{provider}} తో సైన్ అప్ చేయండి"
|
|
93
|
+
},
|
|
94
|
+
"authResetPassword": {
|
|
95
|
+
"newPasswordRequired": "కొత్త పాస్ వర్డ్ అనేది అవసరమైన ఫీల్డ్",
|
|
96
|
+
"passwordsMustMatch": "పాస్ వర్డ్ లు తప్పనిసరిగా సరిపోలాలి",
|
|
97
|
+
"confirmPasswordRequired": "పాస్ వర్డ్ అనేది అవసరమైన ఫీల్డ్ అని ధృవీకరించండి",
|
|
98
|
+
"newPassword": "కొత్త పాస్ వర్డ్",
|
|
99
|
+
"confirmPassword": "పాస్ వర్డ్ ను ధృవీకరించండి",
|
|
100
|
+
"resetPassword": "రీసెట్ పాస్ వర్డ్"
|
|
101
|
+
},
|
|
102
|
+
"authForgotPassword": {
|
|
103
|
+
"email": "ఇమెయిల్ చిరునామా",
|
|
104
|
+
"emailRequired": "ఇమెయిల్ అనేది అవసరమైన ఫీల్డ్",
|
|
105
|
+
"emailSent": "మీ పాస్ వర్డ్ రీసెట్ చేయడానికి సూచనల కొరకు దయచేసి {{email}} ఇమెయిల్ చిరునామాను తనిఖీ చేయండి.",
|
|
106
|
+
"enterEmail": "మీ ఇమెయిల్ చిరునామాను నమోదు చేయండి మరియు మీ పాస్ వర్డ్ ను రీసెట్ చేయడానికి మేము మీకు సూచనలు పంపుతాము.",
|
|
107
|
+
"resendEmail": "ఇమెయిల్ ని తిరిగి పంపండి",
|
|
108
|
+
"continue": "కొనసాగు",
|
|
109
|
+
"goBack": "వెనక్కి వెళ్ళు"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"organisms": {
|
|
114
|
+
"chat": {
|
|
115
|
+
"history": {
|
|
116
|
+
"index": {
|
|
117
|
+
"showHistory": "చరిత్రను చూపించు",
|
|
118
|
+
"lastInputs": "చివరి ఇన్ పుట్ లు",
|
|
119
|
+
"noInputs": "అంత ఖాళీగా...",
|
|
120
|
+
"loading": "లోడింగ్..."
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"inputBox": {
|
|
124
|
+
"input": {
|
|
125
|
+
"placeholder": "మీ సందేశాన్ని ఇక్కడ టైప్ చేయండి..."
|
|
126
|
+
},
|
|
127
|
+
"speechButton": {
|
|
128
|
+
"start": "రికార్డింగ్ ప్రారంభించండి",
|
|
129
|
+
"stop": "రికార్డింగ్ ఆపండి"
|
|
130
|
+
},
|
|
131
|
+
"SubmitButton": {
|
|
132
|
+
"sendMessage": "సందేశం పంపు",
|
|
133
|
+
"stopTask": "స్టాప్ టాస్క్"
|
|
134
|
+
},
|
|
135
|
+
"UploadButton": {
|
|
136
|
+
"attachFiles": "ఫైళ్లను జోడించు"
|
|
137
|
+
},
|
|
138
|
+
"waterMark": {
|
|
139
|
+
"text": "దీనితో నిర్మించబడింది"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"Messages": {
|
|
143
|
+
"index": {
|
|
144
|
+
"running": "రన్నింగ్",
|
|
145
|
+
"executedSuccessfully": "విజయవంతంగా అమలు చేయబడింది",
|
|
146
|
+
"failed": "విఫలమైంది",
|
|
147
|
+
"feedbackUpdated": "ఫీడ్ బ్యాక్ అప్ డేట్ చేయబడింది",
|
|
148
|
+
"updating": "అప్ డేట్ చేయడం"
|
|
149
|
+
},
|
|
150
|
+
"copyButton": {
|
|
151
|
+
"copyToClipboard": "Copy to clipboard",
|
|
152
|
+
"copied": "Copied!"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"dropScreen": {
|
|
156
|
+
"dropYourFilesHere": "మీ ఫైళ్లను ఇక్కడ డ్రాప్ చేయండి"
|
|
157
|
+
},
|
|
158
|
+
"index": {
|
|
159
|
+
"failedToUpload": "అప్ లోడ్ చేయడం విఫలమైంది",
|
|
160
|
+
"cancelledUploadOf": "రద్దు చేసిన అప్ లోడ్",
|
|
161
|
+
"couldNotReachServer": "సర్వర్ కు చేరుకోవడం సాధ్యం కాలేదు",
|
|
162
|
+
"continuingChat": "మునుపటి చాట్ ను కొనసాగించడం"
|
|
163
|
+
},
|
|
164
|
+
"settings": {
|
|
165
|
+
"settingsPanel": "సెట్టింగ్స్ ప్యానెల్",
|
|
166
|
+
"reset": "రీసెట్",
|
|
167
|
+
"cancel": "రద్దు",
|
|
168
|
+
"confirm": "ధ్రువపరచు"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"threadHistory": {
|
|
172
|
+
"sidebar": {
|
|
173
|
+
"filters": {
|
|
174
|
+
"FeedbackSelect": {
|
|
175
|
+
"feedbackAll": "ఫీడ్ బ్యాక్: అన్నీ",
|
|
176
|
+
"feedbackPositive": "ఫీడ్ బ్యాక్: పాజిటివ్",
|
|
177
|
+
"feedbackNegative": "ఫీడ్ బ్యాక్: నెగెటివ్"
|
|
178
|
+
},
|
|
179
|
+
"SearchBar": {
|
|
180
|
+
"search": "వెతుకు"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"DeleteThreadButton": {
|
|
184
|
+
"confirmMessage": "ఇది థ్రెడ్తో పాటు దాని సందేశాలు మరియు ఎలిమెంట్లను తొలగిస్తుంది.",
|
|
185
|
+
"cancel": "రద్దు",
|
|
186
|
+
"confirm": "ధ్రువపరచు",
|
|
187
|
+
"deletingChat": "చాట్ ను డిలీట్ చేయడం",
|
|
188
|
+
"chatDeleted": "చాట్ డిలీట్ చేయబడింది"
|
|
189
|
+
},
|
|
190
|
+
"index": {
|
|
191
|
+
"pastChats": "గత చాట్ లు"
|
|
192
|
+
},
|
|
193
|
+
"ThreadList": {
|
|
194
|
+
"empty": "ఖాళీ...",
|
|
195
|
+
"today": "ఈ రోజు",
|
|
196
|
+
"yesterday": "నిన్న",
|
|
197
|
+
"previous7days": "మునుపటి 7 రోజులు",
|
|
198
|
+
"previous30days": "మునుపటి 30 రోజులు"
|
|
199
|
+
},
|
|
200
|
+
"TriggerButton": {
|
|
201
|
+
"closeSidebar": "క్లోజ్ సైడ్ బార్",
|
|
202
|
+
"openSidebar": "ఓపెన్ సైడ్ బార్"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"Thread": {
|
|
206
|
+
"backToChat": "చాట్ చేయడానికి తిరిగి వెళ్లండి",
|
|
207
|
+
"chatCreatedOn": "ఈ చాట్ దీనిలో సృష్టించబడింది"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"header": {
|
|
211
|
+
"chat": "ముచ్చటించు",
|
|
212
|
+
"readme": "Readme"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"hooks": {
|
|
217
|
+
"useLLMProviders": {
|
|
218
|
+
"failedToFetchProviders": "ప్రొవైడర్లను పొందడంలో విఫలమైంది:"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"pages": {
|
|
222
|
+
"Design": {},
|
|
223
|
+
"Env": {
|
|
224
|
+
"savedSuccessfully": "విజయవంతంగా సేవ్ చేయబడింది",
|
|
225
|
+
"requiredApiKeys": "అవసరమైన API కీలు",
|
|
226
|
+
"requiredApiKeysInfo": "ఈ యాప్ ఉపయోగించడానికి, ఈ క్రింది API కీలు అవసరం అవుతాయి. కీలు మీ పరికరం యొక్క స్థానిక స్టోరేజీలో నిల్వ చేయబడతాయి."
|
|
227
|
+
},
|
|
228
|
+
"Page": {
|
|
229
|
+
"notPartOfProject": "మీరు ఈ ప్రాజెక్టులో భాగం కాదు."
|
|
230
|
+
},
|
|
231
|
+
"ResumeButton": {
|
|
232
|
+
"resumeChat": "రెజ్యూమ్ చాట్"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"atoms": {
|
|
4
|
+
"buttons": {
|
|
5
|
+
"userButton": {
|
|
6
|
+
"menu": {
|
|
7
|
+
"settings": "设置",
|
|
8
|
+
"settingsKey": "S",
|
|
9
|
+
"APIKeys": "API 密钥",
|
|
10
|
+
"logout": "登出"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"molecules": {
|
|
16
|
+
"newChatButton": {
|
|
17
|
+
"newChat": "新建对话"
|
|
18
|
+
},
|
|
19
|
+
"tasklist": {
|
|
20
|
+
"TaskList": {
|
|
21
|
+
"title": "\ud83d\uddd2\ufe0f 任务列表",
|
|
22
|
+
"loading": "加载中...",
|
|
23
|
+
"error": "发生错误"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"attachments": {
|
|
27
|
+
"cancelUpload": "取消上传",
|
|
28
|
+
"removeAttachment": "移除附件"
|
|
29
|
+
},
|
|
30
|
+
"newChatDialog": {
|
|
31
|
+
"createNewChat": "创建新对话?",
|
|
32
|
+
"clearChat": "这将清除当前消息并开始新的对话。",
|
|
33
|
+
"cancel": "取消",
|
|
34
|
+
"confirm": "确认"
|
|
35
|
+
},
|
|
36
|
+
"settingsModal": {
|
|
37
|
+
"settings": "设置",
|
|
38
|
+
"expandMessages": "展开消息",
|
|
39
|
+
"hideChainOfThought": "隐藏思考链",
|
|
40
|
+
"darkMode": "暗色模式"
|
|
41
|
+
},
|
|
42
|
+
"detailsButton": {
|
|
43
|
+
"using": "使用",
|
|
44
|
+
"used": "已用"
|
|
45
|
+
},
|
|
46
|
+
"auth": {
|
|
47
|
+
"authLogin": {
|
|
48
|
+
"title": "登录以访问应用。",
|
|
49
|
+
"form": {
|
|
50
|
+
"email": "电子邮箱地址",
|
|
51
|
+
"password": "密码",
|
|
52
|
+
"noAccount": "没有账户?",
|
|
53
|
+
"alreadyHaveAccount": "已有账户?",
|
|
54
|
+
"signup": "注册",
|
|
55
|
+
"signin": "登录",
|
|
56
|
+
"or": "或者",
|
|
57
|
+
"continue": "继续",
|
|
58
|
+
"forgotPassword": "忘记密码?",
|
|
59
|
+
"passwordMustContain": "您的密码必须包含:",
|
|
60
|
+
"emailRequired": "电子邮箱是必填项",
|
|
61
|
+
"passwordRequired": "密码是必填项"
|
|
62
|
+
},
|
|
63
|
+
"error": {
|
|
64
|
+
"default": "无法登录。",
|
|
65
|
+
"signin": "尝试使用不同的账户登录。",
|
|
66
|
+
"oauthsignin": "尝试使用不同的账户登录。",
|
|
67
|
+
"redirect_uri_mismatch": "重定向URI与OAuth应用配置不匹配。",
|
|
68
|
+
"oauthcallbackerror": "尝试使用不同的账户登录。",
|
|
69
|
+
"oauthcreateaccount": "尝试使用不同的账户登录。",
|
|
70
|
+
"emailcreateaccount": "尝试使用不同的账户登录。",
|
|
71
|
+
"callback": "尝试使用不同的账户登录。",
|
|
72
|
+
"oauthaccountnotlinked": "为了验证您的身份,请使用最初使用的同一账户登录。",
|
|
73
|
+
"emailsignin": "无法发送邮件。",
|
|
74
|
+
"emailverify": "请验证您的电子邮件,已发送一封新邮件。",
|
|
75
|
+
"credentialssignin": "登录失败。请检查您提供的详细信息是否正确。",
|
|
76
|
+
"sessionrequired": "请登录以访问此页面。"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"authVerifyEmail": {
|
|
80
|
+
"almostThere": "您快成功了!我们已向 ",
|
|
81
|
+
"verifyEmailLink": "请单击该邮件中的链接以完成注册。",
|
|
82
|
+
"didNotReceive": "没找到邮件?",
|
|
83
|
+
"resendEmail": "重新发送邮件",
|
|
84
|
+
"goBack": "返回",
|
|
85
|
+
"emailSent": "邮件已成功发送。",
|
|
86
|
+
"verifyEmail": "验证您的电子邮件地址"
|
|
87
|
+
},
|
|
88
|
+
"providerButton": {
|
|
89
|
+
"continue": "使用{{provider}}继续",
|
|
90
|
+
"signup": "使用{{provider}}注册"
|
|
91
|
+
},
|
|
92
|
+
"authResetPassword": {
|
|
93
|
+
"newPasswordRequired": "新密码是必填项",
|
|
94
|
+
"passwordsMustMatch": "密码必须一致",
|
|
95
|
+
"confirmPasswordRequired": "确认密码是必填项",
|
|
96
|
+
"newPassword": "新密码",
|
|
97
|
+
"confirmPassword": "确认密码",
|
|
98
|
+
"resetPassword": "重置密码"
|
|
99
|
+
},
|
|
100
|
+
"authForgotPassword": {
|
|
101
|
+
"email": "电子邮箱地址",
|
|
102
|
+
"emailRequired": "电子邮箱是必填项",
|
|
103
|
+
"emailSent": "请检查电子邮箱{{email}}以获取重置密码的指示。",
|
|
104
|
+
"enterEmail": "请输入您的电子邮箱地址,我们将发送重置密码的指示。",
|
|
105
|
+
"resendEmail": "重新发送邮件",
|
|
106
|
+
"continue": "继续",
|
|
107
|
+
"goBack": "返回"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"organisms": {
|
|
112
|
+
"chat": {
|
|
113
|
+
"history": {
|
|
114
|
+
"index": {
|
|
115
|
+
"showHistory": "显示历史",
|
|
116
|
+
"lastInputs": "最后输入",
|
|
117
|
+
"noInputs": "如此空旷...",
|
|
118
|
+
"loading": "加载中..."
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"inputBox": {
|
|
122
|
+
"input": {
|
|
123
|
+
"placeholder": "在这里输入您的消息..."
|
|
124
|
+
},
|
|
125
|
+
"speechButton": {
|
|
126
|
+
"start": "开始录音",
|
|
127
|
+
"stop": "停止录音"
|
|
128
|
+
},
|
|
129
|
+
"SubmitButton": {
|
|
130
|
+
"sendMessage": "发送消息",
|
|
131
|
+
"stopTask": "停止任务"
|
|
132
|
+
},
|
|
133
|
+
"UploadButton": {
|
|
134
|
+
"attachFiles": "附加文件"
|
|
135
|
+
},
|
|
136
|
+
"waterMark": {
|
|
137
|
+
"text": "使用"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"Messages": {
|
|
141
|
+
"index": {
|
|
142
|
+
"running": "运行中",
|
|
143
|
+
"executedSuccessfully": "执行成功",
|
|
144
|
+
"failed": "失败",
|
|
145
|
+
"feedbackUpdated": "反馈更新",
|
|
146
|
+
"updating": "正在更新"
|
|
147
|
+
},
|
|
148
|
+
"copyButton": {
|
|
149
|
+
"copyToClipboard": "Copy to clipboard",
|
|
150
|
+
"copied": "Copied!"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"dropScreen": {
|
|
154
|
+
"dropYourFilesHere": "在这里拖放您的文件"
|
|
155
|
+
},
|
|
156
|
+
"index": {
|
|
157
|
+
"failedToUpload": "上传失败",
|
|
158
|
+
"cancelledUploadOf": "取消上传",
|
|
159
|
+
"couldNotReachServer": "无法连接到服务器",
|
|
160
|
+
"continuingChat": "继续之前的对话"
|
|
161
|
+
},
|
|
162
|
+
"settings": {
|
|
163
|
+
"settingsPanel": "设置面板",
|
|
164
|
+
"reset": "重置",
|
|
165
|
+
"cancel": "取消",
|
|
166
|
+
"confirm": "确认"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"threadHistory": {
|
|
170
|
+
"sidebar": {
|
|
171
|
+
"filters": {
|
|
172
|
+
"FeedbackSelect": {
|
|
173
|
+
"feedbackAll": "反馈:全部",
|
|
174
|
+
"feedbackPositive": "反馈:正面",
|
|
175
|
+
"feedbackNegative": "反馈:负面"
|
|
176
|
+
},
|
|
177
|
+
"SearchBar": {
|
|
178
|
+
"search": "搜索"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"DeleteThreadButton": {
|
|
182
|
+
"confirmMessage": "这将删除线程及其消息和元素。",
|
|
183
|
+
"cancel": "取消",
|
|
184
|
+
"confirm": "确认",
|
|
185
|
+
"deletingChat": "删除对话",
|
|
186
|
+
"chatDeleted": "对话已删除"
|
|
187
|
+
},
|
|
188
|
+
"index": {
|
|
189
|
+
"pastChats": "过往对话"
|
|
190
|
+
},
|
|
191
|
+
"ThreadList": {
|
|
192
|
+
"empty": "空的...",
|
|
193
|
+
"today": "今天",
|
|
194
|
+
"yesterday": "昨天",
|
|
195
|
+
"previous7days": "前7天",
|
|
196
|
+
"previous30days": "前30天"
|
|
197
|
+
},
|
|
198
|
+
"TriggerButton": {
|
|
199
|
+
"closeSidebar": "关闭侧边栏",
|
|
200
|
+
"openSidebar": "打开侧边栏"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"Thread": {
|
|
204
|
+
"backToChat": "返回对话",
|
|
205
|
+
"chatCreatedOn": "此对话创建于"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"header": {
|
|
209
|
+
"chat": "对话",
|
|
210
|
+
"readme": "说明"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"hooks": {
|
|
215
|
+
"useLLMProviders": {
|
|
216
|
+
"failedToFetchProviders": "获取提供者失败:"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"pages": {
|
|
220
|
+
"Design": {},
|
|
221
|
+
"Env": {
|
|
222
|
+
"savedSuccessfully": "保存成功",
|
|
223
|
+
"requiredApiKeys": "必需的API密钥",
|
|
224
|
+
"requiredApiKeysInfo": "要使用此应用,需要以下API密钥。这些密钥存储在您的设备本地存储中。"
|
|
225
|
+
},
|
|
226
|
+
"Page": {
|
|
227
|
+
"notPartOfProject": "您不是此项目的一部分。"
|
|
228
|
+
},
|
|
229
|
+
"ResumeButton": {
|
|
230
|
+
"resumeChat": "恢复对话"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
chainlit/translations.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# TODO:
|
|
2
|
+
# - Support linting plural
|
|
3
|
+
# - Support interpolation
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def compare_json_structures(truth, to_compare, path=""):
|
|
7
|
+
"""
|
|
8
|
+
Compare the structure of two deeply nested JSON objects.
|
|
9
|
+
Args:
|
|
10
|
+
truth (dict): The 'truth' JSON object.
|
|
11
|
+
to_compare (dict): The 'to_compare' JSON object.
|
|
12
|
+
path (str): The current path for error reporting (used internally).
|
|
13
|
+
Returns:
|
|
14
|
+
A list of differences found.
|
|
15
|
+
"""
|
|
16
|
+
if not isinstance(truth, dict) or not isinstance(to_compare, dict):
|
|
17
|
+
raise ValueError("Both inputs must be dictionaries.")
|
|
18
|
+
|
|
19
|
+
errors = []
|
|
20
|
+
|
|
21
|
+
truth_keys = set(truth.keys())
|
|
22
|
+
to_compare_keys = set(to_compare.keys())
|
|
23
|
+
|
|
24
|
+
extra_keys = to_compare_keys - truth_keys
|
|
25
|
+
missing_keys = truth_keys - to_compare_keys
|
|
26
|
+
|
|
27
|
+
for key in extra_keys:
|
|
28
|
+
errors.append(f"⚠️ Extra key: '{path + '.' + key if path else key}'")
|
|
29
|
+
|
|
30
|
+
for key in missing_keys:
|
|
31
|
+
errors.append(f"❌ Missing key: '{path + '.' + key if path else key}'")
|
|
32
|
+
|
|
33
|
+
for key in truth_keys & to_compare_keys:
|
|
34
|
+
if isinstance(truth[key], dict) and isinstance(to_compare[key], dict):
|
|
35
|
+
# Recursive call to navigate through nested dictionaries
|
|
36
|
+
errors += compare_json_structures(
|
|
37
|
+
truth[key], to_compare[key], path + "." + key if path else key
|
|
38
|
+
)
|
|
39
|
+
elif not isinstance(truth[key], dict) and not isinstance(to_compare[key], dict):
|
|
40
|
+
# If both are not dicts, we are at leaf nodes and structure matches; skip value comparison
|
|
41
|
+
continue
|
|
42
|
+
else:
|
|
43
|
+
# Structure mismatch: one is a dict, the other is not
|
|
44
|
+
errors.append(
|
|
45
|
+
f"❌ Structure mismatch at: '{path + '.' + key if path else key}'"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return errors
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def lint_translation_json(file, truth, to_compare):
|
|
52
|
+
print(f"\nLinting {file}...")
|
|
53
|
+
|
|
54
|
+
errors = compare_json_structures(truth, to_compare)
|
|
55
|
+
|
|
56
|
+
if errors:
|
|
57
|
+
for error in errors:
|
|
58
|
+
print(f"{error}")
|
|
59
|
+
else:
|
|
60
|
+
print(f"✅ No errors found in {file}")
|