@lobehub/chat 1.35.11 → 1.35.12

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 CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.35.12](https://github.com/lobehub/lobe-chat/compare/v1.35.11...v1.35.12)
6
+
7
+ <sup>Released on **2024-12-05**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix typo of prompts.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix typo of prompts, closes [#4837](https://github.com/lobehub/lobe-chat/issues/4837) ([9350ef0](https://github.com/lobehub/lobe-chat/commit/9350ef0))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.35.11](https://github.com/lobehub/lobe-chat/compare/v1.35.10...v1.35.11)
6
31
 
7
32
  <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 | Description |
289
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
290
- | [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` |
291
- | [Python Artisan](https://chat-preview.lobehub.com/market?agent=yunchat)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | Expert in Python development and deep learning, skilled in tool selection and code optimization<br/>`python-development` `deep-learning` `code-optimization` `security-review` `project-planning` |
292
- | [AI Assistant for Course Content and Teaching Guidelines](https://chat-preview.lobehub.com/market?agent=course-prep-teaching-guide-ai)<br/><sup>By **[HNaga](https://github.com/HNaga)** on **2024-11-29**</sup> | This AI assistant is designed to help educators and instructors prepare comprehensive course content and provide practical teaching guidelines. It leverages advanced NLP capabilities to generate lesson plans, suggest engaging teaching strategies, and offer insights into educational best practices.<br/>`education` `teaching` `course-design` `content-creation` `ai-assistance` `curriculum-development` `instructional-design` |
293
- | [Backend Development Assistant](https://chat-preview.lobehub.com/market?agent=backend-assistant)<br/><sup>By **[zeno980](https://github.com/zeno980)** on **2024-11-26**</sup> | Skilled in backend development tasks<br/>`backend-development` `ai-technology` `web-applications` `spring` `sql` |
294
-
295
- > 📊 Total agents: [<kbd>**450**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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
- | [日常医生](https://chat-preview.lobehub.com/market?agent=yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | 擅长外科诊疗与个性化健康管理<br/>`全科医学` `外科` `健康咨询` `个性化治疗` `医学教育` |
280
- | [Python 智匠](https://chat-preview.lobehub.com/market?agent=yunchat)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | 精通 Python 开发与深度学习,擅长工具选择与代码优化<br/>`python开发` `深度学习` `代码优化` `安全审查` `项目规划` |
281
- | [课程内容和教学指南的 AI 助手](https://chat-preview.lobehub.com/market?agent=course-prep-teaching-guide-ai)<br/><sup>By **[HNaga](https://github.com/HNaga)** on **2024-11-29**</sup> | 这个 AI 助手旨在帮助教育工作者和讲师准备全面的课程内容并提供实用的教学指南。它利用先进的自然语言处理能力生成课程计划,建议引人入胜的教学策略,并提供教育最佳实践的见解。<br/>`教育` `教学` `课程设计` `内容创作` `人工智能助手` `课程开发` `教学设计` |
282
- | [后端开发助手](https://chat-preview.lobehub.com/market?agent=backend-assistant)<br/><sup>By **[zeno980](https://github.com/zeno980)** on **2024-11-26**</sup> | 擅长后端开发任务<br/>`后端开发` `ai技术` `web应用` `spring` `sql` |
283
-
284
- > 📊 Total agents: [<kbd>**450**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix typo of prompts."
6
+ ]
7
+ },
8
+ "date": "2024-12-05",
9
+ "version": "1.35.12"
10
+ },
2
11
  {
3
12
  "children": {},
4
13
  "date": "2024-12-04",
@@ -152,7 +152,7 @@
152
152
  "name": "Logo",
153
153
  "visible": true,
154
154
  "label": "",
155
- "customCss": ".login-logo-box {}",
155
+ "customCss": ".login-logo-box {} \n.panel-logo {\n width: 80px;\n}",
156
156
  "placeholder": "",
157
157
  "rule": "None",
158
158
  "isCustom": false
@@ -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 "您已经完成了所有配置文件的下载。请运行以下命令启动LobeChat:"
166
+ echo "您已经完成了所有配置。请运行以下命令启动LobeChat:"
129
167
  ;;
130
168
  *)
131
- echo "You have completed downloading all configuration files. Please run this command to start LobeChat:"
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: do not use this demo application in production!!!"
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
- # Display final message
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.11",
3
+ "version": "1.35.12",
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",
@@ -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 hisotry:</docstring>
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
  `;