@lobehub/chat 1.21.0 → 1.21.2
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,48 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.21.2](https://github.com/lobehub/lobe-chat/compare/v1.21.1...v1.21.2)
|
6
|
+
|
7
|
+
<sup>Released on **2024-10-01**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Adjust Wenxin icon size.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Adjust Wenxin icon size, closes [#4229](https://github.com/lobehub/lobe-chat/issues/4229) ([6ae79ce](https://github.com/lobehub/lobe-chat/commit/6ae79ce))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.21.1](https://github.com/lobehub/lobe-chat/compare/v1.21.0...v1.21.1)
|
31
|
+
|
32
|
+
<sup>Released on **2024-09-30**</sup>
|
33
|
+
|
34
|
+
<br/>
|
35
|
+
|
36
|
+
<details>
|
37
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
38
|
+
|
39
|
+
</details>
|
40
|
+
|
41
|
+
<div align="right">
|
42
|
+
|
43
|
+
[](#readme-top)
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
5
47
|
## [Version 1.21.0](https://github.com/lobehub/lobe-chat/compare/v1.20.8...v1.21.0)
|
6
48
|
|
7
49
|
<sup>Released on **2024-09-30**</sup>
|
package/Dockerfile
CHANGED
@@ -113,9 +113,10 @@ FROM scratch
|
|
113
113
|
COPY --from=app / /
|
114
114
|
|
115
115
|
ENV NODE_ENV="production" \
|
116
|
-
NODE_OPTIONS="--use-openssl-ca" \
|
117
|
-
NODE_EXTRA_CA_CERTS="
|
118
|
-
NODE_TLS_REJECT_UNAUTHORIZED=""
|
116
|
+
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \
|
117
|
+
NODE_EXTRA_CA_CERTS="" \
|
118
|
+
NODE_TLS_REJECT_UNAUTHORIZED="" \
|
119
|
+
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
|
119
120
|
|
120
121
|
# set hostname to localhost
|
121
122
|
ENV HOSTNAME="0.0.0.0" \
|
@@ -185,6 +186,8 @@ ENV \
|
|
185
186
|
TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
|
186
187
|
# Upstage
|
187
188
|
UPSTAGE_API_KEY="" \
|
189
|
+
# Wenxin
|
190
|
+
WENXIN_ACCESS_KEY="" WENXIN_SECRET_KEY="" \
|
188
191
|
# 01.AI
|
189
192
|
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
|
190
193
|
# Zhipu
|
package/Dockerfile.database
CHANGED
@@ -126,9 +126,10 @@ FROM scratch
|
|
126
126
|
COPY --from=app / /
|
127
127
|
|
128
128
|
ENV NODE_ENV="production" \
|
129
|
-
NODE_OPTIONS="--use-openssl-ca" \
|
130
|
-
NODE_EXTRA_CA_CERTS="
|
131
|
-
NODE_TLS_REJECT_UNAUTHORIZED=""
|
129
|
+
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \
|
130
|
+
NODE_EXTRA_CA_CERTS="" \
|
131
|
+
NODE_TLS_REJECT_UNAUTHORIZED="" \
|
132
|
+
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
|
132
133
|
|
133
134
|
# set hostname to localhost
|
134
135
|
ENV HOSTNAME="0.0.0.0" \
|
@@ -217,6 +218,8 @@ ENV \
|
|
217
218
|
TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
|
218
219
|
# Upstage
|
219
220
|
UPSTAGE_API_KEY="" \
|
221
|
+
# Wenxin
|
222
|
+
WENXIN_ACCESS_KEY="" WENXIN_SECRET_KEY="" \
|
220
223
|
# 01.AI
|
221
224
|
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
|
222
225
|
# Zhipu
|
package/README.md
CHANGED
@@ -287,12 +287,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
287
287
|
|
288
288
|
| Recent Submits | Description |
|
289
289
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
290
|
+
| [C++/Qt](https://chat-preview.lobehub.com/market?agent=qt-c)<br/><sup>By **[liangyuR](https://github.com/liangyuR)** on **2024-09-30**</sup> | Excels in teaching C++/Qt coding practices<br/>`c` `qt` |
|
290
291
|
| [Birthday Invitation Messages](https://chat-preview.lobehub.com/market?agent=birthday-invitation-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | Specializes in crafting engaging and personalized Birthday Invitation messages, catering to various themes and tones.<br/>`message-composition` `personalization` `tone-versatility` `event-detail-integration` `interaction-approach` |
|
291
292
|
| [Death Anniversary Messages](https://chat-preview.lobehub.com/market?agent=death-anniversary-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | Specializes in crafting sensitive and heartfelt Death Anniversary messages with compassion and empathy.<br/>`condolences` `message-composition` `grief-support` `cultural-awareness` `emotional-sensitivity` |
|
292
293
|
| [Flux Prompt Generator](https://chat-preview.lobehub.com/market?agent=flux-prompt-generator)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | Flux Prompt Generation Assistant: Expert in crafting detailed, creative prompts for high-quality image outputs from the Flux model.<br/>`prompt-generation` `image-generation` `art-style` `creativity` `crafting` |
|
293
|
-
| [God Bless You Messages](https://chat-preview.lobehub.com/market?agent=god-bless-you-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | Expert in crafting personalized "God Bless You" messages with spiritual sensitivity and language mastery.<br/>`message-composition` `personalization` `spiritual-sensitivity` `language-mastery` `interaction-approach` |
|
294
294
|
|
295
|
-
> 📊 Total agents: [<kbd>**
|
295
|
+
> 📊 Total agents: [<kbd>**404**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
296
296
|
|
297
297
|
<!-- AGENT LIST -->
|
298
298
|
|
package/README.zh-CN.md
CHANGED
@@ -275,12 +275,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
275
275
|
|
276
276
|
| 最近新增 | 助手说明 |
|
277
277
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
278
|
+
| [C++/Qt](https://chat-preview.lobehub.com/market?agent=qt-c)<br/><sup>By **[liangyuR](https://github.com/liangyuR)** on **2024-09-30**</sup> | 擅长教授 C++/Qt 编程实践<br/>`c` `qt` |
|
278
279
|
| [生日邀请信息](https://chat-preview.lobehub.com/market?agent=birthday-invitation-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | 专注于制作引人入胜和个性化的生日邀请信息,适应各种主题和语气。<br/>`信息构成` `个性化` `语气多样性` `活动细节整合` `互动方式` |
|
279
280
|
| [忌日信息](https://chat-preview.lobehub.com/market?agent=death-anniversary-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | 专注于以同情和共情的方式撰写敏感且发自内心的忌日信息。<br/>`慰问` `信息撰写` `悲伤支持` `文化意识` `情感敏感性` |
|
280
281
|
| [Flux 提示生成器](https://chat-preview.lobehub.com/market?agent=flux-prompt-generator)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | Flux 提示生成助手:专注于为 Flux 模型生成高质量图像输出而创作详细、创意提示的专家。<br/>`提示生成` `图像生成` `艺术风格` `创意` `创作` |
|
281
|
-
| [上帝保佑你的信息](https://chat-preview.lobehub.com/market?agent=god-bless-you-message)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2024-09-29**</sup> | 擅长以灵性敏感和语言掌握来创作个性化的 “上帝保佑你” 信息。<br/>`信息创作` `个性化` `灵性敏感` `语言掌握` `互动方式` |
|
282
282
|
|
283
|
-
> 📊 Total agents: [<kbd>**
|
283
|
+
> 📊 Total agents: [<kbd>**404**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
284
284
|
|
285
285
|
<!-- AGENT LIST -->
|
286
286
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.21.
|
3
|
+
"version": "1.21.2",
|
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,6 +1,5 @@
|
|
1
1
|
const dns = require('dns').promises;
|
2
2
|
const fs = require('fs').promises;
|
3
|
-
const tls = require('tls');
|
4
3
|
const { spawn } = require('child_process');
|
5
4
|
|
6
5
|
// Set file paths
|
@@ -23,68 +22,6 @@ const isValidIP = (ip, version = 4) => {
|
|
23
22
|
}
|
24
23
|
};
|
25
24
|
|
26
|
-
// Function to check TLS validity of a URL
|
27
|
-
const isValidTLS = (url = '') => {
|
28
|
-
if (!url) {
|
29
|
-
console.log('⚠️ TLS Check: No URL provided. Skipping TLS check. Ensure correct setting ENV.');
|
30
|
-
console.log('-------------------------------------');
|
31
|
-
return Promise.resolve();
|
32
|
-
}
|
33
|
-
|
34
|
-
const { protocol, host, port } = parseUrl(url);
|
35
|
-
if (protocol !== 'https') {
|
36
|
-
console.log(`⚠️ TLS Check: Non-HTTPS protocol (${protocol}). Skipping TLS check for ${url}.`);
|
37
|
-
console.log('-------------------------------------');
|
38
|
-
return Promise.resolve();
|
39
|
-
}
|
40
|
-
|
41
|
-
const options = { host, port, servername: host };
|
42
|
-
return new Promise((resolve, reject) => {
|
43
|
-
const socket = tls.connect(options, () => {
|
44
|
-
console.log(`✅ TLS Check: Valid certificate for ${host}:${port}.`);
|
45
|
-
console.log('-------------------------------------');
|
46
|
-
|
47
|
-
socket.end();
|
48
|
-
|
49
|
-
resolve();
|
50
|
-
});
|
51
|
-
|
52
|
-
socket.on('error', (err) => {
|
53
|
-
const errMsg = `❌ TLS Check: Error for ${host}:${port}. Details:`;
|
54
|
-
switch (err.code) {
|
55
|
-
case 'CERT_HAS_EXPIRED':
|
56
|
-
case 'DEPTH_ZERO_SELF_SIGNED_CERT':
|
57
|
-
case 'ERR_TLS_CERT_ALTNAME_INVALID':
|
58
|
-
console.error(`${errMsg} Certificate is not valid. Consider setting NODE_TLS_REJECT_UNAUTHORIZED="0" or mapping /etc/ssl/certs/ca-certificates.crt.`);
|
59
|
-
break;
|
60
|
-
case 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY':
|
61
|
-
console.error(`${errMsg} Unable to verify issuer. Ensure correct mapping of /etc/ssl/certs/ca-certificates.crt.`);
|
62
|
-
break;
|
63
|
-
default:
|
64
|
-
console.error(`${errMsg} Network issue. Check firewall or DNS.`);
|
65
|
-
break;
|
66
|
-
}
|
67
|
-
reject(err);
|
68
|
-
});
|
69
|
-
});
|
70
|
-
};
|
71
|
-
|
72
|
-
// Function to check TLS connections for OSS and Auth Issuer
|
73
|
-
const checkTLSConnections = async () => {
|
74
|
-
await Promise.all([
|
75
|
-
isValidTLS(process.env.S3_ENDPOINT),
|
76
|
-
isValidTLS(process.env.S3_PUBLIC_DOMAIN),
|
77
|
-
isValidTLS(getEnvVarsByKeyword('_ISSUER')),
|
78
|
-
]);
|
79
|
-
};
|
80
|
-
|
81
|
-
// Function to get environment variable by keyword
|
82
|
-
const getEnvVarsByKeyword = (keyword) => {
|
83
|
-
return Object.entries(process.env)
|
84
|
-
.filter(([key, value]) => key.includes(keyword) && value)
|
85
|
-
.map(([, value]) => value)[0] || null;
|
86
|
-
};
|
87
|
-
|
88
25
|
// Function to parse protocol, host and port from a URL
|
89
26
|
const parseUrl = (url) => {
|
90
27
|
const { protocol, hostname: host, port } = new URL(url);
|
@@ -170,26 +107,18 @@ const runServer = async () => {
|
|
170
107
|
|
171
108
|
if (process.env.DATABASE_DRIVER) {
|
172
109
|
try {
|
173
|
-
|
174
|
-
await fs.access(DB_MIGRATION_SCRIPT_PATH);
|
175
|
-
|
176
|
-
await runScript(DB_MIGRATION_SCRIPT_PATH);
|
177
|
-
} catch (err) {
|
178
|
-
if (err.code === 'ENOENT') {
|
179
|
-
console.log(`⚠️ DB Migration: Not found ${DB_MIGRATION_SCRIPT_PATH}. Skipping DB migration. Ensure to migrate database manually.`);
|
180
|
-
console.log('-------------------------------------');
|
181
|
-
} else {
|
182
|
-
console.error('❌ Error during DB migration:');
|
183
|
-
console.error(err);
|
184
|
-
process.exit(1);
|
185
|
-
}
|
186
|
-
}
|
110
|
+
await fs.access(DB_MIGRATION_SCRIPT_PATH);
|
187
111
|
|
188
|
-
await
|
112
|
+
await runScript(DB_MIGRATION_SCRIPT_PATH);
|
189
113
|
} catch (err) {
|
190
|
-
|
191
|
-
|
192
|
-
|
114
|
+
if (err.code === 'ENOENT') {
|
115
|
+
console.log(`⚠️ DB Migration: Not found ${DB_MIGRATION_SCRIPT_PATH}. Skipping DB migration. Ensure to migrate database manually.`);
|
116
|
+
console.log('-------------------------------------');
|
117
|
+
} else {
|
118
|
+
console.error('❌ Error during DB migration:');
|
119
|
+
console.error(err);
|
120
|
+
process.exit(1);
|
121
|
+
}
|
193
122
|
}
|
194
123
|
}
|
195
124
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Wenxin } from '@lobehub/icons';
|
4
3
|
import { Input } from 'antd';
|
5
4
|
import { useTranslation } from 'react-i18next';
|
6
5
|
|
@@ -41,6 +40,5 @@ export const useWenxinProvider = (): ProviderItem => {
|
|
41
40
|
name: [KeyVaultsConfigKey, providerKey, 'secretKey'],
|
42
41
|
},
|
43
42
|
],
|
44
|
-
title: <Wenxin.Combine size={32} type={'color'} />,
|
45
43
|
};
|
46
44
|
};
|