@lobehub/chat 1.62.9 → 1.62.11
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 +58 -0
- package/changelog/v1.json +21 -0
- package/docs/self-hosting/environment-variables/model-provider.mdx +18 -0
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +18 -0
- package/docs/self-hosting/server-database/sealos.mdx +5 -1
- package/package.json +3 -3
- package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/index.tsx +1 -1
- package/src/config/modelProviders/volcengine.ts +4 -1
- package/src/libs/agent-runtime/azureai/index.ts +21 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,64 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.62.11](https://github.com/lobehub/lobe-chat/compare/v1.62.10...v1.62.11)
|
6
|
+
|
7
|
+
<sup>Released on **2025-02-23**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Refine role assignment logic for specific Azure OpenAI models & Sensitive URL.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Add custom `proxyUrl` support for Volcengine.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's fixed
|
23
|
+
|
24
|
+
- **misc**: Refine role assignment logic for specific Azure OpenAI models & Sensitive URL, closes [#6366](https://github.com/lobehub/lobe-chat/issues/6366) ([d47c2c6](https://github.com/lobehub/lobe-chat/commit/d47c2c6))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Add custom `proxyUrl` support for Volcengine, closes [#6433](https://github.com/lobehub/lobe-chat/issues/6433) ([2b1aca9](https://github.com/lobehub/lobe-chat/commit/2b1aca9))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
38
|
+
### [Version 1.62.10](https://github.com/lobehub/lobe-chat/compare/v1.62.9...v1.62.10)
|
39
|
+
|
40
|
+
<sup>Released on **2025-02-22**</sup>
|
41
|
+
|
42
|
+
#### 🐛 Bug Fixes
|
43
|
+
|
44
|
+
- **misc**: Fix fetch on client check status display.
|
45
|
+
|
46
|
+
<br/>
|
47
|
+
|
48
|
+
<details>
|
49
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
50
|
+
|
51
|
+
#### What's fixed
|
52
|
+
|
53
|
+
- **misc**: Fix fetch on client check status display, closes [#6405](https://github.com/lobehub/lobe-chat/issues/6405) ([9579e41](https://github.com/lobehub/lobe-chat/commit/9579e41))
|
54
|
+
|
55
|
+
</details>
|
56
|
+
|
57
|
+
<div align="right">
|
58
|
+
|
59
|
+
[](#readme-top)
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
5
63
|
### [Version 1.62.9](https://github.com/lobehub/lobe-chat/compare/v1.62.8...v1.62.9)
|
6
64
|
|
7
65
|
<sup>Released on **2025-02-22**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,25 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Refine role assignment logic for specific Azure OpenAI models & Sensitive URL."
|
6
|
+
],
|
7
|
+
"improvements": [
|
8
|
+
"Add custom proxyUrl support for Volcengine."
|
9
|
+
]
|
10
|
+
},
|
11
|
+
"date": "2025-02-23",
|
12
|
+
"version": "1.62.11"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"children": {
|
16
|
+
"fixes": [
|
17
|
+
"Fix fetch on client check status display."
|
18
|
+
]
|
19
|
+
},
|
20
|
+
"date": "2025-02-22",
|
21
|
+
"version": "1.62.10"
|
22
|
+
},
|
2
23
|
{
|
3
24
|
"children": {
|
4
25
|
"fixes": [
|
@@ -183,6 +183,24 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
|
|
183
183
|
- Default: -
|
184
184
|
- Example: `sk-xxxxxx...xxxxxx`
|
185
185
|
|
186
|
+
## XAI
|
187
|
+
|
188
|
+
### `XAI_API_KEY`
|
189
|
+
|
190
|
+
- Type: Required
|
191
|
+
- Description: This is the API key you applied for in the XAI service
|
192
|
+
- Default: -
|
193
|
+
- Example: `xai-xxxxxx...xxxxxx`
|
194
|
+
|
195
|
+
## Wenxin
|
196
|
+
|
197
|
+
### `WENXIN_API_KEY`
|
198
|
+
|
199
|
+
- Type: Required
|
200
|
+
- Description: This is the API key you applied for in the Baidu Wenxin service
|
201
|
+
- Default: -
|
202
|
+
- Example: `xxxxxx...xxxxxx`
|
203
|
+
|
186
204
|
## OpenRouter AI
|
187
205
|
|
188
206
|
### `OPENROUTER_API_KEY`
|
@@ -181,6 +181,24 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
|
|
181
181
|
- 默认值:-
|
182
182
|
- 示例:`sk-xxxxxx...xxxxxx`
|
183
183
|
|
184
|
+
## XAI
|
185
|
+
|
186
|
+
### `XAI_API_KEY`
|
187
|
+
|
188
|
+
- 类型:必选
|
189
|
+
- 描述:这是你在 XAI 服务中申请的 API 密钥
|
190
|
+
- 默认值:-
|
191
|
+
- 示例:`xai-xxxxxx...xxxxxx`
|
192
|
+
|
193
|
+
## 文心一言
|
194
|
+
|
195
|
+
### `WENXIN_API_KEY`
|
196
|
+
|
197
|
+
- 类型:必选
|
198
|
+
- 描述:这是你在百度智能云平台申请的文心一言 API 密钥
|
199
|
+
- 默认值:-
|
200
|
+
- 示例:`xxxxxx...xxxxxx`
|
201
|
+
|
184
202
|
## OpenRouter AI
|
185
203
|
|
186
204
|
### `OPENROUTER_API_KEY`
|
@@ -63,7 +63,11 @@ Select `Next.js (App Router)` as the framework, then click the `Start building`
|
|
63
63
|
|
64
64
|
## Deploy Lobe Chat Database Version
|
65
65
|
|
66
|
-
**Step 1**:
|
66
|
+
**Step 1**:Click the button below to visit the Lobe Chat database version application deployment page:
|
67
|
+
|
68
|
+
[](https://template.usw.sealos.io/deploy?templateName=lobe-chat-db)
|
69
|
+
|
70
|
+
Fill in the following three required parameters:
|
67
71
|
|
68
72
|
- `AUTH_LOGTO_ID`:The App ID of the Logto application
|
69
73
|
- `AUTH_LOGTO_SECRET`:The App Secret of the Logto application
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.62.
|
3
|
+
"version": "1.62.11",
|
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",
|
@@ -119,7 +119,7 @@
|
|
119
119
|
"@cyntler/react-doc-viewer": "^1.17.0",
|
120
120
|
"@electric-sql/pglite": "0.2.13",
|
121
121
|
"@google-cloud/vertexai": "^1.9.2",
|
122
|
-
"@google/generative-ai": "^0.
|
122
|
+
"@google/generative-ai": "^0.22.0",
|
123
123
|
"@huggingface/inference": "^2.8.1",
|
124
124
|
"@icons-pack/react-simple-icons": "9.6.0",
|
125
125
|
"@khmyznikov/pwa-install": "0.3.9",
|
@@ -167,7 +167,7 @@
|
|
167
167
|
"i18next-resources-to-backend": "^1.2.1",
|
168
168
|
"idb-keyval": "^6.2.1",
|
169
169
|
"immer": "^10.1.1",
|
170
|
-
"jose": "^
|
170
|
+
"jose": "^6.0.0",
|
171
171
|
"js-sha256": "^0.11.0",
|
172
172
|
"jsonl-parse-stringify": "^1.0.3",
|
173
173
|
"langchain": "^0.3.10",
|
@@ -258,7 +258,7 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
258
258
|
children: isLoading ? (
|
259
259
|
<Skeleton.Button active className={styles.switchLoading} />
|
260
260
|
) : (
|
261
|
-
<Switch
|
261
|
+
<Switch checked={isFetchOnClient} disabled={configUpdating} />
|
262
262
|
),
|
263
263
|
desc: t('providerModels.config.fetchOnClient.desc'),
|
264
264
|
label: t('providerModels.config.fetchOnClient.title'),
|
@@ -7,9 +7,12 @@ const Doubao: ModelProviderCard = {
|
|
7
7
|
'字节跳动推出的大模型服务的开发平台,提供功能丰富、安全以及具备价格竞争力的模型调用服务,同时提供模型数据、精调、推理、评测等端到端功能,全方位保障您的 AI 应用开发落地。',
|
8
8
|
id: 'volcengine',
|
9
9
|
modelsUrl: 'https://www.volcengine.com/docs/82379/1330310',
|
10
|
-
name: '
|
10
|
+
name: 'Volcengine',
|
11
11
|
settings: {
|
12
12
|
disableBrowserRequest: true, // CORS error
|
13
|
+
proxyUrl: {
|
14
|
+
placeholder: 'https://ark.cn-beijing.volces.com/api/v3',
|
15
|
+
},
|
13
16
|
sdkType: 'openai',
|
14
17
|
showDeployName: true,
|
15
18
|
smoothing: {
|
@@ -29,10 +29,29 @@ export class LobeAzureAI implements LobeRuntimeAI {
|
|
29
29
|
const { messages, model, ...params } = payload;
|
30
30
|
// o1 series models on Azure OpenAI does not support streaming currently
|
31
31
|
const enableStreaming = model.includes('o1') ? false : (params.stream ?? true);
|
32
|
+
|
33
|
+
// Convert 'system' role to 'user' or 'developer' based on the model
|
34
|
+
const systemToUserModels = new Set([
|
35
|
+
'o1-preview',
|
36
|
+
'o1-preview-2024-09-12',
|
37
|
+
'o1-mini',
|
38
|
+
'o1-mini-2024-09-12',
|
39
|
+
]);
|
40
|
+
|
41
|
+
const updatedMessages = messages.map((message) => ({
|
42
|
+
...message,
|
43
|
+
role:
|
44
|
+
(model.includes('o1') || model.includes('o3')) && message.role === 'system'
|
45
|
+
? [...systemToUserModels].some((sub) => model.includes(sub))
|
46
|
+
? 'user'
|
47
|
+
: 'developer'
|
48
|
+
: message.role,
|
49
|
+
}));
|
50
|
+
|
32
51
|
try {
|
33
52
|
const response = this.client.path('/chat/completions').post({
|
34
53
|
body: {
|
35
|
-
messages:
|
54
|
+
messages: updatedMessages as OpenAI.ChatCompletionMessageParam[],
|
36
55
|
model,
|
37
56
|
...params,
|
38
57
|
stream: enableStreaming,
|
@@ -98,7 +117,7 @@ export class LobeAzureAI implements LobeRuntimeAI {
|
|
98
117
|
|
99
118
|
private maskSensitiveUrl = (url: string) => {
|
100
119
|
// 使用正则表达式匹配 'https://' 后面和 '.azure.com/' 前面的内容
|
101
|
-
const regex = /^(https:\/\/)([^.]+)(\.azure\.com\/.*)$/;
|
120
|
+
const regex = /^(https:\/\/)([^.]+)(\.cognitiveservices\.azure\.com\/.*)$/;
|
102
121
|
|
103
122
|
// 使用替换函数
|
104
123
|
return url.replace(regex, (match, protocol, subdomain, rest) => {
|