@lobehub/chat 1.35.11 → 1.35.13
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.
- package/CHANGELOG.md +42 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/changelog/v1.json +14 -0
- package/docker-compose/local/init_data.json +1 -1
- package/docker-compose/local/setup.sh +128 -6
- package/package.json +2 -2
- package/src/prompts/systemRole/index.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,48 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.35.13](https://github.com/lobehub/lobe-chat/compare/v1.35.12...v1.35.13)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-06**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
22
|
+
### [Version 1.35.12](https://github.com/lobehub/lobe-chat/compare/v1.35.11...v1.35.12)
|
23
|
+
|
24
|
+
<sup>Released on **2024-12-05**</sup>
|
25
|
+
|
26
|
+
#### 🐛 Bug Fixes
|
27
|
+
|
28
|
+
- **misc**: Fix typo of prompts.
|
29
|
+
|
30
|
+
<br/>
|
31
|
+
|
32
|
+
<details>
|
33
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
34
|
+
|
35
|
+
#### What's fixed
|
36
|
+
|
37
|
+
- **misc**: Fix typo of prompts, closes [#4837](https://github.com/lobehub/lobe-chat/issues/4837) ([9350ef0](https://github.com/lobehub/lobe-chat/commit/9350ef0))
|
38
|
+
|
39
|
+
</details>
|
40
|
+
|
41
|
+
<div align="right">
|
42
|
+
|
43
|
+
[](#readme-top)
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
5
47
|
### [Version 1.35.11](https://github.com/lobehub/lobe-chat/compare/v1.35.10...v1.35.11)
|
6
48
|
|
7
49
|
<sup>Released on **2024-12-04**</sup>
|
package/README.md
CHANGED
@@ -285,14 +285,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
288
|
-
| Recent Submits
|
289
|
-
|
|
290
|
-
| [
|
291
|
-
| [
|
292
|
-
| [
|
293
|
-
| [
|
294
|
-
|
295
|
-
> 📊 Total agents: [<kbd>**
|
288
|
+
| Recent Submits | Description |
|
289
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
290
|
+
| [System Instruction Expert](https://chat-preview.lobehub.com/market?agent=instructer)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-12-04**</sup> | Skilled in refining and generating efficient system instructions<br/>`system-instructions` `writing` `detail-optimization` `user-needs` |
|
291
|
+
| [Japanese Memory Helper](https://chat-preview.lobehub.com/market?agent=japan-language-helper)<br/><sup>By **[sharkbear212](https://github.com/sharkbear212)** on **2024-12-04**</sup> | Specializes in Japanese Hiragana, Katakana, vocabulary, and memory techniques for explanations and phrases<br/>`explanation` `memory-techniques` `japanese-teaching` |
|
292
|
+
| [Poetry Card Designer](https://chat-preview.lobehub.com/market?agent=poetry-card-designer)<br/><sup>By **[lianxin255](https://github.com/lianxin255)** on **2024-12-03**</sup> | Skilled in designing poetry cards to enhance artistic sense and appeal<br/>`poetry-card-design` `card` `creativity` `artistic-expression` |
|
293
|
+
| [Daily Doctor](https://chat-preview.lobehub.com/market?agent=yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | Specializes in surgical diagnosis and personalized health management<br/>`general-medicine` `surgery` `health-consultation` `personalized-treatment` `medical-education` |
|
294
|
+
|
295
|
+
> 📊 Total agents: [<kbd>**453**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
296
296
|
|
297
297
|
<!-- AGENT LIST -->
|
298
298
|
|
package/README.zh-CN.md
CHANGED
@@ -274,14 +274,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
274
274
|
|
275
275
|
<!-- AGENT LIST -->
|
276
276
|
|
277
|
-
| 最近新增
|
278
|
-
|
|
279
|
-
| [
|
280
|
-
| [
|
281
|
-
| [
|
282
|
-
| [
|
283
|
-
|
284
|
-
> 📊 Total agents: [<kbd>**
|
277
|
+
| 最近新增 | 助手说明 |
|
278
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
279
|
+
| [系统指令专家](https://chat-preview.lobehub.com/market?agent=instructer)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-12-04**</sup> | 擅长精炼与生成高效系统指令<br/>`系统指令` `写作` `细节优化` `用户需求` |
|
280
|
+
| [日语帮助记忆师](https://chat-preview.lobehub.com/market?agent=japan-language-helper)<br/><sup>By **[sharkbear212](https://github.com/sharkbear212)** on **2024-12-04**</sup> | 擅长日语五十音,平假名,片假名,单词和短语解释与记忆技巧<br/>`解释` `记忆技巧` `日语教学` |
|
281
|
+
| [诗词卡片设计师](https://chat-preview.lobehub.com/market?agent=poetry-card-designer)<br/><sup>By **[lianxin255](https://github.com/lianxin255)** on **2024-12-03**</sup> | 擅长设计诗词卡片,提升艺术感与吸引力<br/>`诗词卡片设计` `卡片` `创意` `艺术表现` |
|
282
|
+
| [日常医生](https://chat-preview.lobehub.com/market?agent=yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | 擅长外科诊疗与个性化健康管理<br/>`全科医学` `外科` `健康咨询` `个性化治疗` `医学教育` |
|
283
|
+
|
284
|
+
> 📊 Total agents: [<kbd>**453**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {},
|
4
|
+
"date": "2024-12-06",
|
5
|
+
"version": "1.35.13"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"children": {
|
9
|
+
"fixes": [
|
10
|
+
"Fix typo of prompts."
|
11
|
+
]
|
12
|
+
},
|
13
|
+
"date": "2024-12-05",
|
14
|
+
"version": "1.35.12"
|
15
|
+
},
|
2
16
|
{
|
3
17
|
"children": {},
|
4
18
|
"date": "2024-12-04",
|
@@ -21,6 +21,10 @@ LANGUAGE="en_US"
|
|
21
21
|
# Determine the source URL to download files
|
22
22
|
SOURCE_URL="https://raw.githubusercontent.com/lobehub/lobe-chat/main"
|
23
23
|
|
24
|
+
# Arg: --host
|
25
|
+
# Determine the server host
|
26
|
+
HOST=""
|
27
|
+
|
24
28
|
# 2. Parse script arguments
|
25
29
|
while getopts "fl:-:" opt; do
|
26
30
|
case $opt in
|
@@ -40,8 +44,12 @@ while getopts "fl:-:" opt; do
|
|
40
44
|
SOURCE_URL="${!OPTIND}"
|
41
45
|
OPTIND=$(($OPTIND + 1))
|
42
46
|
;;
|
47
|
+
host)
|
48
|
+
HOST="${!OPTIND}"
|
49
|
+
OPTIND=$(($OPTIND + 1))
|
50
|
+
;;
|
43
51
|
*)
|
44
|
-
echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2
|
52
|
+
echo "Usage: $0 [-f] [-l language|--lang language] [--url source] [--host serverhost]" >&2
|
45
53
|
exit 1
|
46
54
|
;;
|
47
55
|
esac
|
@@ -122,13 +130,43 @@ show_message() {
|
|
122
130
|
;;
|
123
131
|
esac
|
124
132
|
;;
|
133
|
+
security_secrect_regenerate)
|
134
|
+
case $LANGUAGE in
|
135
|
+
zh_CN)
|
136
|
+
echo "重新生成安全密钥..."
|
137
|
+
;;
|
138
|
+
*)
|
139
|
+
echo "Regenerate security secrets..."
|
140
|
+
;;
|
141
|
+
esac
|
142
|
+
;;
|
143
|
+
security_secrect_regenerate_failed)
|
144
|
+
case $LANGUAGE in
|
145
|
+
zh_CN)
|
146
|
+
echo "无法重新生成安全密钥:"
|
147
|
+
;;
|
148
|
+
*)
|
149
|
+
echo "Failed to regenerate security secrets: "
|
150
|
+
;;
|
151
|
+
esac
|
152
|
+
;;
|
153
|
+
security_secrect_regenerate_report)
|
154
|
+
case $LANGUAGE in
|
155
|
+
zh_CN)
|
156
|
+
echo "安全密钥生成结果如下:"
|
157
|
+
;;
|
158
|
+
*)
|
159
|
+
echo "Security secret generation results are as follows:"
|
160
|
+
;;
|
161
|
+
esac
|
162
|
+
;;
|
125
163
|
tips_run_command)
|
126
164
|
case $LANGUAGE in
|
127
165
|
zh_CN)
|
128
|
-
echo "
|
166
|
+
echo "您已经完成了所有配置。请运行以下命令启动LobeChat:"
|
129
167
|
;;
|
130
168
|
*)
|
131
|
-
echo "You have completed
|
169
|
+
echo "You have completed all configurations. Please run this command to start LobeChat:"
|
132
170
|
;;
|
133
171
|
esac
|
134
172
|
;;
|
@@ -155,10 +193,10 @@ show_message() {
|
|
155
193
|
tips_warning)
|
156
194
|
case $LANGUAGE in
|
157
195
|
zh_CN)
|
158
|
-
echo "
|
196
|
+
echo "警告:如果你正在生产环境中使用,请在日志中检查密钥是否已经生成!!!"
|
159
197
|
;;
|
160
198
|
*)
|
161
|
-
echo "Warning:
|
199
|
+
echo "Warning: If you are using it in a production environment, please check if the keys have been generated in the logs!!!"
|
162
200
|
;;
|
163
201
|
esac
|
164
202
|
;;
|
@@ -235,7 +273,91 @@ download_file "$SOURCE_URL/${FILES[3]}" "s3_data.tar.gz"
|
|
235
273
|
extract_file "s3_data.tar.gz" "."
|
236
274
|
rm s3_data.tar.gz
|
237
275
|
|
238
|
-
#
|
276
|
+
# ==========================
|
277
|
+
# === Regenerate Secrets ===
|
278
|
+
# ==========================
|
279
|
+
|
280
|
+
generate_key() {
|
281
|
+
if [[ -z "$1" ]]; then
|
282
|
+
echo "Usage: generate_key <length>"
|
283
|
+
return 1
|
284
|
+
fi
|
285
|
+
echo $(openssl rand -hex $1 | tr -d '\n' | fold -w $1 | head -n 1)
|
286
|
+
}
|
287
|
+
|
288
|
+
echo $(show_message "security_secrect_regenerate")
|
289
|
+
|
290
|
+
# Generate CASDOOR_SECRET
|
291
|
+
CASDOOR_SECRET=$(generate_key 32)
|
292
|
+
if [ $? -ne 0 ]; then
|
293
|
+
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_SECRET"
|
294
|
+
else
|
295
|
+
# Search and replace the value of CASDOOR_SECRET in .env
|
296
|
+
sed -i "s#^AUTH_CASDOOR_SECRET=.*#AUTH_CASDOOR_SECRET=${CASDOOR_SECRET}#" .env
|
297
|
+
if [ $? -ne 0 ]; then
|
298
|
+
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`.env\`"
|
299
|
+
fi
|
300
|
+
# replace `clientSecrect` in init_data.json
|
301
|
+
sed -i "s#dbf205949d704de81b0b5b3603174e23fbecc354#${CASDOOR_SECRET}#" init_data.json
|
302
|
+
if [ $? -ne 0 ]; then
|
303
|
+
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`init_data.json\`"
|
304
|
+
fi
|
305
|
+
fi
|
306
|
+
|
307
|
+
# Generate Casdoor User
|
308
|
+
CASDOOR_USER="admin"
|
309
|
+
CASDOOR_PASSWORD=$(generate_key 6)
|
310
|
+
if [ $? -ne 0 ]; then
|
311
|
+
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD"
|
312
|
+
else
|
313
|
+
# replace `password` in init_data.json
|
314
|
+
sed -i "s/"123"/${CASDOOR_PASSWORD}/" init_data.json
|
315
|
+
if [ $? -ne 0 ]; then
|
316
|
+
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD in \`init_data.json\`"
|
317
|
+
fi
|
318
|
+
fi
|
319
|
+
|
320
|
+
# Generate Minio S3 access key
|
321
|
+
# Temporarily disable key gen for minio because
|
322
|
+
# minio can not start with a access key in envs
|
323
|
+
#S3_SECRET_ACCESS_KEY=$(generate_key 32)
|
324
|
+
#if [ $? -ne 0 ]; then
|
325
|
+
# echo $(show_message "security_secrect_regenerate_failed") "S3_SECRET_ACCESS_KEY"
|
326
|
+
#else
|
327
|
+
# # Search and replace the value of S3_SECRET_ACCESS_KEY in .env
|
328
|
+
# sed -i "s#^S3_SECRET_ACCESS_KEY=.*#S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}#" .env
|
329
|
+
# if [ $? -ne 0 ]; then
|
330
|
+
# echo $(show_message "security_secrect_regenerate_failed") "S3_SECRET_ACCESS_KEY in \`.env\`"
|
331
|
+
# fi
|
332
|
+
#fi
|
333
|
+
|
334
|
+
# Modify the .env file if the host is specified
|
335
|
+
if [ -n "$HOST" ]; then
|
336
|
+
# Modify env
|
337
|
+
sed -i "s/localhost/$HOST/g" .env
|
338
|
+
if [ $? -ne 0 ]; then
|
339
|
+
echo $(show_message "security_secrect_regenerate_failed") "HOST in \`.env\`"
|
340
|
+
fi
|
341
|
+
# Modify casdoor init data
|
342
|
+
sed -i "s/localhost/$HOST/g" init_data.json
|
343
|
+
if [ $? -ne 0 ]; then
|
344
|
+
echo $(show_message "security_secrect_regenerate_failed") "HOST in \`init_data.json\`"
|
345
|
+
fi
|
346
|
+
fi
|
347
|
+
|
348
|
+
# Display configuration reports
|
349
|
+
|
350
|
+
echo $(show_message "security_secrect_regenerate_report")
|
351
|
+
|
352
|
+
if [ -n "$HOST" ]; then
|
353
|
+
echo -e "Server Host: $HOST"
|
354
|
+
fi
|
355
|
+
echo -e "Casdoor: \n - Username: admin\n - Password: ${CASDOOR_PASSWORD}\n - Client Secret: ${CASDOOR_SECRET}"
|
356
|
+
|
357
|
+
# ===========================
|
358
|
+
# == Display final message ==
|
359
|
+
# ===========================
|
360
|
+
|
239
361
|
printf "\n%s\n\n" "$(show_message "tips_run_command")"
|
240
362
|
print_centered "docker compose up -d" "green"
|
241
363
|
printf "\n%s" "$(show_message "tips_show_documentation")"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.35.
|
3
|
+
"version": "1.35.13",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -259,7 +259,7 @@
|
|
259
259
|
"@types/node": "^20.16.13",
|
260
260
|
"@types/numeral": "^2.0.5",
|
261
261
|
"@types/pg": "^8.11.10",
|
262
|
-
"@types/react": "
|
262
|
+
"@types/react": "18.3.13",
|
263
263
|
"@types/react-dom": "^18.3.1",
|
264
264
|
"@types/rtl-detect": "^1.0.3",
|
265
265
|
"@types/semver": "^7.5.8",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
const historySummaryPrompt = (historySummary: string) => `<chat_history_summary>
|
2
|
-
<docstring>Users may have lots of chat messages,here is the summary of the
|
2
|
+
<docstring>Users may have lots of chat messages, here is the summary of the history:</docstring>
|
3
3
|
<summary>${historySummary}</summary>
|
4
4
|
</chat_history_summary>
|
5
5
|
`;
|