@lobehub/chat 1.90.3 → 1.91.0
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/.cursor/rules/backend-architecture.mdc +12 -9
- package/.cursor/rules/cursor-ux-optimize.mdc +1 -1
- package/.cursor/rules/define-database-model.mdc +1 -1
- package/.cursor/rules/drizzle-schema-style-guide.mdc +1 -1
- package/.cursor/rules/i18n/i18n.mdc +1 -1
- package/.cursor/rules/project-introduce.mdc +2 -1
- package/.cursor/rules/system-role.mdc +42 -0
- package/.cursor/rules/zustand-action-patterns.mdc +318 -0
- package/.cursor/rules/zustand-slice-organization.mdc +300 -0
- package/CHANGELOG.md +66 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/changelog/v1.json +24 -0
- package/docs/self-hosting/advanced/model-list.mdx +1 -1
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.mdx +2 -2
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +2 -2
- package/package.json +44 -44
- package/packages/web-crawler/src/crawImpl/exa.ts +93 -0
- package/packages/web-crawler/src/crawImpl/firecrawl.ts +97 -0
- package/packages/web-crawler/src/crawImpl/index.ts +6 -0
- package/packages/web-crawler/src/crawImpl/tavily.ts +94 -0
- package/src/config/aiModels/modelscope.ts +3 -3
- package/src/config/modelProviders/modelscope.ts +3 -3
- package/src/database/client/migrations.json +10 -0
- package/src/database/migrations/0023_remove_param_and_doubao.sql +6 -0
- package/src/database/migrations/meta/0023_snapshot.json +5340 -0
- package/src/database/migrations/meta/_journal.json +7 -0
- package/src/features/PluginsUI/Render/utils/iframeOnReady.test.ts +1 -1
- package/src/features/PluginsUI/Render/utils/pluginSettings.test.ts +1 -1
- package/src/features/PluginsUI/Render/utils/pluginState.test.ts +1 -1
- package/src/libs/model-runtime/BaseAI.ts +3 -3
- package/src/libs/model-runtime/ModelRuntime.ts +2 -2
- package/src/libs/model-runtime/UniformRuntime/index.ts +2 -2
- package/src/libs/model-runtime/ai21/index.ts +2 -2
- package/src/libs/model-runtime/ai360/index.ts +2 -2
- package/src/libs/model-runtime/anthropic/index.ts +15 -11
- package/src/libs/model-runtime/azureOpenai/index.ts +2 -2
- package/src/libs/model-runtime/azureai/index.ts +4 -4
- package/src/libs/model-runtime/baichuan/index.ts +2 -2
- package/src/libs/model-runtime/bedrock/index.ts +4 -4
- package/src/libs/model-runtime/cloudflare/index.ts +2 -2
- package/src/libs/model-runtime/cohere/index.ts +2 -2
- package/src/libs/model-runtime/deepseek/index.ts +2 -2
- package/src/libs/model-runtime/fireworksai/index.ts +2 -2
- package/src/libs/model-runtime/giteeai/index.ts +2 -2
- package/src/libs/model-runtime/github/index.ts +2 -2
- package/src/libs/model-runtime/google/index.ts +7 -5
- package/src/libs/model-runtime/groq/index.ts +2 -2
- package/src/libs/model-runtime/higress/index.ts +2 -2
- package/src/libs/model-runtime/huggingface/index.ts +2 -2
- package/src/libs/model-runtime/hunyuan/index.ts +2 -2
- package/src/libs/model-runtime/index.ts +1 -1
- package/src/libs/model-runtime/infiniai/index.ts +2 -2
- package/src/libs/model-runtime/internlm/index.ts +7 -9
- package/src/libs/model-runtime/jina/index.ts +2 -2
- package/src/libs/model-runtime/lmstudio/index.ts +2 -2
- package/src/libs/model-runtime/minimax/index.ts +2 -2
- package/src/libs/model-runtime/mistral/index.ts +2 -2
- package/src/libs/model-runtime/modelscope/index.ts +2 -3
- package/src/libs/model-runtime/moonshot/index.ts +2 -2
- package/src/libs/model-runtime/novita/index.ts +2 -2
- package/src/libs/model-runtime/nvidia/index.ts +2 -2
- package/src/libs/model-runtime/ollama/index.ts +2 -2
- package/src/libs/model-runtime/openai/index.ts +3 -3
- package/src/libs/model-runtime/openrouter/index.ts +2 -2
- package/src/libs/model-runtime/perplexity/index.ts +2 -2
- package/src/libs/model-runtime/ppio/index.ts +2 -2
- package/src/libs/model-runtime/qiniu/index.ts +2 -2
- package/src/libs/model-runtime/qwen/index.ts +2 -2
- package/src/libs/model-runtime/sambanova/index.ts +2 -2
- package/src/libs/model-runtime/search1api/index.ts +2 -2
- package/src/libs/model-runtime/sensenova/index.ts +2 -2
- package/src/libs/model-runtime/siliconcloud/index.ts +2 -2
- package/src/libs/model-runtime/spark/index.ts +15 -13
- package/src/libs/model-runtime/stepfun/index.ts +2 -2
- package/src/libs/model-runtime/taichu/index.ts +2 -2
- package/src/libs/model-runtime/tencentcloud/index.ts +2 -2
- package/src/libs/model-runtime/togetherai/index.ts +2 -2
- package/src/libs/model-runtime/types/chat.ts +1 -1
- package/src/libs/model-runtime/upstage/index.ts +2 -2
- package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.test.ts +7 -7
- package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.ts +3 -3
- package/src/libs/model-runtime/vllm/index.ts +2 -2
- package/src/libs/model-runtime/volcengine/index.ts +2 -2
- package/src/libs/model-runtime/wenxin/index.ts +2 -2
- package/src/libs/model-runtime/xai/index.ts +6 -3
- package/src/libs/model-runtime/xinference/index.ts +2 -2
- package/src/libs/model-runtime/zeroone/index.ts +2 -2
- package/src/libs/model-runtime/zhipu/index.ts +2 -2
- package/src/middleware.ts +3 -1
- package/src/server/routers/tools/search.test.ts +2 -4
- package/src/server/services/search/impls/bocha/index.ts +124 -0
- package/src/server/services/search/impls/bocha/type.ts +47 -0
- package/src/server/services/search/impls/exa/index.ts +129 -0
- package/src/server/services/search/impls/exa/type.ts +39 -0
- package/src/server/services/search/impls/firecrawl/index.ts +128 -0
- package/src/server/services/search/impls/firecrawl/type.ts +35 -0
- package/src/server/services/search/impls/index.ts +31 -0
- package/src/server/services/search/impls/jina/index.ts +109 -0
- package/src/server/services/search/impls/jina/type.ts +26 -0
- package/src/server/services/search/impls/tavily/index.ts +124 -0
- package/src/server/services/search/impls/tavily/type.ts +36 -0
- package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChat.test.ts +4 -2
- package/src/store/chat/slices/message/action.test.ts +2 -1
- package/src/store/chat/slices/topic/action.test.ts +3 -2
@@ -0,0 +1,300 @@
|
|
1
|
+
---
|
2
|
+
description:
|
3
|
+
globs: src/store/**
|
4
|
+
alwaysApply: false
|
5
|
+
---
|
6
|
+
# LobeChat Zustand Store Slice 组织架构
|
7
|
+
|
8
|
+
本文档描述了 LobeChat 项目中 Zustand Store 的模块化 Slice 组织方式,展示如何通过分片架构管理复杂的应用状态。
|
9
|
+
|
10
|
+
## 顶层 Store 结构
|
11
|
+
|
12
|
+
LobeChat 的 `chat` store (`src/store/chat/`) 采用模块化的 slice 结构来组织状态和逻辑。
|
13
|
+
|
14
|
+
### 关键聚合文件
|
15
|
+
|
16
|
+
- **`src/store/chat/initialState.ts`**: 聚合所有 slice 的初始状态
|
17
|
+
- **`src/store/chat/store.ts`**: 定义顶层的 `ChatStore`,组合所有 slice 的 actions
|
18
|
+
- **`src/store/chat/selectors.ts`**: 统一导出所有 slice 的 selectors
|
19
|
+
- **`src/store/chat/helpers.ts`**: 提供聊天相关的辅助函数
|
20
|
+
|
21
|
+
### Store 聚合模式
|
22
|
+
|
23
|
+
```typescript
|
24
|
+
// src/store/chat/initialState.ts
|
25
|
+
import { ChatTopicState, initialTopicState } from './slices/topic/initialState';
|
26
|
+
import { ChatMessageState, initialMessageState } from './slices/message/initialState';
|
27
|
+
import { ChatAIChatState, initialAiChatState } from './slices/aiChat/initialState';
|
28
|
+
|
29
|
+
export type ChatStoreState = ChatTopicState &
|
30
|
+
ChatMessageState &
|
31
|
+
ChatAIChatState &
|
32
|
+
// ...其他 slice states
|
33
|
+
|
34
|
+
export const initialState: ChatStoreState = {
|
35
|
+
...initialMessageState,
|
36
|
+
...initialTopicState,
|
37
|
+
...initialAiChatState,
|
38
|
+
// ...其他 initial slice states
|
39
|
+
};
|
40
|
+
```
|
41
|
+
|
42
|
+
```typescript
|
43
|
+
// src/store/chat/store.ts
|
44
|
+
import { ChatMessageAction, chatMessage } from './slices/message/action';
|
45
|
+
import { ChatTopicAction, chatTopic } from './slices/topic/action';
|
46
|
+
import { ChatAIChatAction, chatAiChat } from './slices/aiChat/actions';
|
47
|
+
|
48
|
+
export interface ChatStoreAction
|
49
|
+
extends ChatMessageAction,
|
50
|
+
ChatTopicAction,
|
51
|
+
ChatAIChatAction,
|
52
|
+
// ...其他 slice actions
|
53
|
+
|
54
|
+
const createStore: StateCreator<ChatStore, [['zustand/devtools', never]]> = (...params) => ({
|
55
|
+
...initialState,
|
56
|
+
...chatMessage(...params),
|
57
|
+
...chatTopic(...params),
|
58
|
+
...chatAiChat(...params),
|
59
|
+
// ...其他 slice action creators
|
60
|
+
});
|
61
|
+
|
62
|
+
export const useChatStore = createWithEqualityFn<ChatStore>()(
|
63
|
+
subscribeWithSelector(devtools(createStore)),
|
64
|
+
shallow,
|
65
|
+
);
|
66
|
+
```
|
67
|
+
|
68
|
+
## 单个 Slice 的标准结构
|
69
|
+
|
70
|
+
每个 slice 位于 `src/store/chat/slices/[sliceName]/` 目录下:
|
71
|
+
|
72
|
+
```
|
73
|
+
src/store/chat/slices/
|
74
|
+
└── [sliceName]/ # 例如 message, topic, aiChat, builtinTool
|
75
|
+
├── action.ts # 定义 actions (或者是一个 actions/ 目录)
|
76
|
+
├── initialState.ts # 定义 state 结构和初始值
|
77
|
+
├── reducer.ts # (可选) 如果使用 reducer 模式
|
78
|
+
├── selectors.ts # 定义 selectors
|
79
|
+
└── index.ts # (可选) 重新导出模块内容
|
80
|
+
```
|
81
|
+
|
82
|
+
### 文件职责说明
|
83
|
+
|
84
|
+
1. **`initialState.ts`**:
|
85
|
+
- 定义 slice 的 TypeScript 状态接口
|
86
|
+
- 提供初始状态默认值
|
87
|
+
|
88
|
+
```typescript
|
89
|
+
// 典型的 initialState.ts 结构
|
90
|
+
export interface ChatTopicState {
|
91
|
+
activeTopicId?: string;
|
92
|
+
topicMaps: Record<string, ChatTopic[]>; // 核心数据结构
|
93
|
+
topicsInit: boolean;
|
94
|
+
topicLoadingIds: string[];
|
95
|
+
// ...其他状态字段
|
96
|
+
}
|
97
|
+
|
98
|
+
export const initialTopicState: ChatTopicState = {
|
99
|
+
activeTopicId: undefined,
|
100
|
+
topicMaps: {},
|
101
|
+
topicsInit: false,
|
102
|
+
topicLoadingIds: [],
|
103
|
+
// ...其他初始值
|
104
|
+
};
|
105
|
+
```
|
106
|
+
|
107
|
+
2. **`reducer.ts`** (复杂状态使用):
|
108
|
+
- 定义纯函数 reducer,处理同步状态转换
|
109
|
+
- 使用 `immer` 确保不可变更新
|
110
|
+
|
111
|
+
```typescript
|
112
|
+
// 典型的 reducer.ts 结构
|
113
|
+
import { produce } from 'immer';
|
114
|
+
|
115
|
+
interface AddChatTopicAction {
|
116
|
+
type: 'addTopic';
|
117
|
+
value: CreateTopicParams & { id?: string };
|
118
|
+
}
|
119
|
+
|
120
|
+
interface UpdateChatTopicAction {
|
121
|
+
id: string;
|
122
|
+
type: 'updateTopic';
|
123
|
+
value: Partial<ChatTopic>;
|
124
|
+
}
|
125
|
+
|
126
|
+
export type ChatTopicDispatch = AddChatTopicAction | UpdateChatTopicAction;
|
127
|
+
|
128
|
+
export const topicReducer = (state: ChatTopic[] = [], payload: ChatTopicDispatch): ChatTopic[] => {
|
129
|
+
switch (payload.type) {
|
130
|
+
case 'addTopic': {
|
131
|
+
return produce(state, (draftState) => {
|
132
|
+
draftState.unshift({
|
133
|
+
...payload.value,
|
134
|
+
id: payload.value.id ?? Date.now().toString(),
|
135
|
+
createdAt: Date.now(),
|
136
|
+
});
|
137
|
+
});
|
138
|
+
}
|
139
|
+
case 'updateTopic': {
|
140
|
+
return produce(state, (draftState) => {
|
141
|
+
const index = draftState.findIndex((topic) => topic.id === payload.id);
|
142
|
+
if (index !== -1) {
|
143
|
+
draftState[index] = { ...draftState[index], ...payload.value };
|
144
|
+
}
|
145
|
+
});
|
146
|
+
}
|
147
|
+
default:
|
148
|
+
return state;
|
149
|
+
}
|
150
|
+
};
|
151
|
+
```
|
152
|
+
|
153
|
+
3. **`selectors.ts`**:
|
154
|
+
- 提供状态查询和计算函数
|
155
|
+
- 供 UI 组件使用的状态订阅接口
|
156
|
+
- **重要**: 使用 `export const xxxSelectors` 模式聚合所有 selectors
|
157
|
+
|
158
|
+
```typescript
|
159
|
+
// 典型的 selectors.ts 结构
|
160
|
+
import { ChatStoreState } from '../../initialState';
|
161
|
+
|
162
|
+
const currentTopics = (s: ChatStoreState): ChatTopic[] | undefined =>
|
163
|
+
s.topicMaps[s.activeId];
|
164
|
+
|
165
|
+
const currentActiveTopic = (s: ChatStoreState): ChatTopic | undefined => {
|
166
|
+
return currentTopics(s)?.find((topic) => topic.id === s.activeTopicId);
|
167
|
+
};
|
168
|
+
|
169
|
+
const getTopicById = (id: string) => (s: ChatStoreState): ChatTopic | undefined =>
|
170
|
+
currentTopics(s)?.find((topic) => topic.id === id);
|
171
|
+
|
172
|
+
// 核心模式:使用 xxxSelectors 聚合导出
|
173
|
+
export const topicSelectors = {
|
174
|
+
currentActiveTopic,
|
175
|
+
currentTopics,
|
176
|
+
getTopicById,
|
177
|
+
// ...其他 selectors
|
178
|
+
};
|
179
|
+
```
|
180
|
+
|
181
|
+
## 特殊 Slice 组织模式
|
182
|
+
|
183
|
+
### 复杂 Actions 的子目录结构 (aiChat Slice)
|
184
|
+
|
185
|
+
当 slice 的 actions 过于复杂时,可以拆分到子目录:
|
186
|
+
|
187
|
+
```
|
188
|
+
src/store/chat/slices/aiChat/
|
189
|
+
├── actions/
|
190
|
+
│ ├── generateAIChat.ts # AI 对话生成
|
191
|
+
│ ├── rag.ts # RAG 检索增强生成
|
192
|
+
│ ├── memory.ts # 对话记忆管理
|
193
|
+
│ └── index.ts # 聚合所有 actions
|
194
|
+
├── initialState.ts
|
195
|
+
├── selectors.ts
|
196
|
+
└── index.ts
|
197
|
+
```
|
198
|
+
|
199
|
+
参考:`src/store/chat/slices/aiChat/actions/`
|
200
|
+
|
201
|
+
### 工具类 Slice (builtinTool)
|
202
|
+
|
203
|
+
管理多种内置工具的状态:
|
204
|
+
|
205
|
+
```
|
206
|
+
src/store/chat/slices/builtinTool/
|
207
|
+
├── actions/
|
208
|
+
│ ├── dalle.ts # DALL-E 图像生成
|
209
|
+
│ ├── search.ts # 搜索功能
|
210
|
+
│ ├── localFile.ts # 本地文件操作
|
211
|
+
│ └── index.ts
|
212
|
+
├── initialState.ts
|
213
|
+
├── selectors.ts
|
214
|
+
└── index.ts
|
215
|
+
```
|
216
|
+
|
217
|
+
参考:`src/store/chat/slices/builtinTool/`
|
218
|
+
|
219
|
+
## 状态设计模式
|
220
|
+
|
221
|
+
### 1. Map 结构用于关联数据
|
222
|
+
```typescript
|
223
|
+
// 以 sessionId 为 key,管理多个会话的数据
|
224
|
+
topicMaps: Record<string, ChatTopic[]>
|
225
|
+
messagesMap: Record<string, ChatMessage[]>
|
226
|
+
```
|
227
|
+
|
228
|
+
### 2. 数组用于加载状态管理
|
229
|
+
```typescript
|
230
|
+
// 管理多个并发操作的加载状态
|
231
|
+
messageLoadingIds: string[]
|
232
|
+
topicLoadingIds: string[]
|
233
|
+
chatLoadingIds: string[]
|
234
|
+
```
|
235
|
+
|
236
|
+
### 3. 可选字段用于当前活动项
|
237
|
+
```typescript
|
238
|
+
// 当前激活的实体 ID
|
239
|
+
activeId: string
|
240
|
+
activeTopicId?: string
|
241
|
+
activeThreadId?: string
|
242
|
+
```
|
243
|
+
|
244
|
+
## Slice 集成到顶层 Store
|
245
|
+
|
246
|
+
### 1. 状态聚合
|
247
|
+
```typescript
|
248
|
+
// 在 initialState.ts 中
|
249
|
+
export type ChatStoreState = ChatTopicState &
|
250
|
+
ChatMessageState &
|
251
|
+
ChatAIChatState &
|
252
|
+
// ...其他 slice states
|
253
|
+
```
|
254
|
+
|
255
|
+
### 2. Action 接口聚合
|
256
|
+
```typescript
|
257
|
+
// 在 store.ts 中
|
258
|
+
export interface ChatStoreAction
|
259
|
+
extends ChatMessageAction,
|
260
|
+
ChatTopicAction,
|
261
|
+
ChatAIChatAction,
|
262
|
+
// ...其他 slice actions
|
263
|
+
```
|
264
|
+
|
265
|
+
### 3. Selector 统一导出
|
266
|
+
```typescript
|
267
|
+
// 在 selectors.ts 中 - 统一聚合 selectors
|
268
|
+
export { chatSelectors } from './slices/message/selectors';
|
269
|
+
export { topicSelectors } from './slices/topic/selectors';
|
270
|
+
export { aiChatSelectors } from './slices/aiChat/selectors';
|
271
|
+
|
272
|
+
// 每个 slice 的 selectors.ts 都使用 xxxSelectors 模式:
|
273
|
+
// export const chatSelectors = { ... }
|
274
|
+
// export const topicSelectors = { ... }
|
275
|
+
// export const aiChatSelectors = { ... }
|
276
|
+
```
|
277
|
+
|
278
|
+
## 最佳实践
|
279
|
+
|
280
|
+
1. **Slice 划分原则**:
|
281
|
+
- 按功能领域划分(message, topic, aiChat 等)
|
282
|
+
- 每个 slice 管理相关的状态和操作
|
283
|
+
- 避免 slice 之间的强耦合
|
284
|
+
|
285
|
+
2. **文件命名规范**:
|
286
|
+
- 使用小驼峰命名 slice 目录
|
287
|
+
- 文件名使用一致的模式(action.ts, selectors.ts 等)
|
288
|
+
- 复杂 actions 时使用 actions/ 子目录
|
289
|
+
|
290
|
+
3. **状态结构设计**:
|
291
|
+
- 扁平化的状态结构,避免深层嵌套
|
292
|
+
- 使用 Map 结构管理列表数据
|
293
|
+
- 分离加载状态和业务数据
|
294
|
+
|
295
|
+
4. **类型安全**:
|
296
|
+
- 为每个 slice 定义清晰的 TypeScript 接口
|
297
|
+
- 使用 Zustand 的 StateCreator 确保类型一致性
|
298
|
+
- 在顶层聚合时保持类型安全
|
299
|
+
|
300
|
+
这种模块化的 slice 组织方式使得大型应用的状态管理变得清晰、可维护,并且易于扩展。
|
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,72 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
## [Version 1.91.0](https://github.com/lobehub/lobe-chat/compare/v1.90.4...v1.91.0)
|
6
|
+
|
7
|
+
<sup>Released on **2025-06-03**</sup>
|
8
|
+
|
9
|
+
#### ✨ Features
|
10
|
+
|
11
|
+
- **misc**: Add more provider support for search & crawl.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Update modelscope models.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's improved
|
23
|
+
|
24
|
+
- **misc**: Add more provider support for search & crawl, closes [#8033](https://github.com/lobehub/lobe-chat/issues/8033) ([23fade3](https://github.com/lobehub/lobe-chat/commit/23fade3))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Update modelscope models, closes [#8057](https://github.com/lobehub/lobe-chat/issues/8057) ([3e02c25](https://github.com/lobehub/lobe-chat/commit/3e02c25))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
38
|
+
### [Version 1.90.4](https://github.com/lobehub/lobe-chat/compare/v1.90.3...v1.90.4)
|
39
|
+
|
40
|
+
<sup>Released on **2025-06-02**</sup>
|
41
|
+
|
42
|
+
#### ♻ Code Refactoring
|
43
|
+
|
44
|
+
- **misc**: Rename the createOpenAICompatibleRuntime.
|
45
|
+
|
46
|
+
#### 🐛 Bug Fixes
|
47
|
+
|
48
|
+
- **misc**: Update the clerk middleware to support route protection.
|
49
|
+
|
50
|
+
<br/>
|
51
|
+
|
52
|
+
<details>
|
53
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
54
|
+
|
55
|
+
#### Code refactoring
|
56
|
+
|
57
|
+
- **misc**: Rename the createOpenAICompatibleRuntime, closes [#8049](https://github.com/lobehub/lobe-chat/issues/8049) ([ee660d6](https://github.com/lobehub/lobe-chat/commit/ee660d6))
|
58
|
+
|
59
|
+
#### What's fixed
|
60
|
+
|
61
|
+
- **misc**: Update the clerk middleware to support route protection, closes [#8044](https://github.com/lobehub/lobe-chat/issues/8044) ([309f973](https://github.com/lobehub/lobe-chat/commit/309f973))
|
62
|
+
|
63
|
+
</details>
|
64
|
+
|
65
|
+
<div align="right">
|
66
|
+
|
67
|
+
[](#readme-top)
|
68
|
+
|
69
|
+
</div>
|
70
|
+
|
5
71
|
### [Version 1.90.3](https://github.com/lobehub/lobe-chat/compare/v1.90.2...v1.90.3)
|
6
72
|
|
7
73
|
<sup>Released on **2025-06-01**</sup>
|
package/README.md
CHANGED
@@ -209,8 +209,8 @@ We have implemented support for the following model service providers:
|
|
209
209
|
- **[ModelScope](https://lobechat.com/discover/provider/modelscope)**:
|
210
210
|
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs builds foundational models and AI systems for enterprises, accelerating the application of generative AI in production.
|
211
211
|
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage focuses on developing AI models for various business needs, including Solar LLM and document AI, aiming to achieve artificial general intelligence (AGI) for work. It allows for the creation of simple conversational agents through Chat API and supports functional calling, translation, embedding, and domain-specific applications.
|
212
|
-
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI is a company dedicated to building artificial intelligence to accelerate human scientific discovery. Our mission is to advance our collective understanding of the universe.
|
213
|
-
- **[
|
212
|
+
- **[xAI (Grok)](https://lobechat.com/discover/provider/xai)**: xAI is a company dedicated to building artificial intelligence to accelerate human scientific discovery. Our mission is to advance our collective understanding of the universe.
|
213
|
+
- **[Aliyun Bailian](https://lobechat.com/discover/provider/qwen)**: Tongyi Qianwen is a large-scale language model independently developed by Alibaba Cloud, featuring strong natural language understanding and generation capabilities. It can answer various questions, create written content, express opinions, and write code, playing a role in multiple fields.
|
214
214
|
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: An enterprise-level one-stop platform for large model and AI-native application development and services, providing the most comprehensive and user-friendly toolchain for the entire process of generative artificial intelligence model development and application development.
|
215
215
|
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: A large language model developed by Tencent, equipped with powerful Chinese creative capabilities, logical reasoning abilities in complex contexts, and reliable task execution skills.
|
216
216
|
- **[ZhiPu](https://lobechat.com/discover/provider/zhipu)**: Zhipu AI offers an open platform for multimodal and language models, supporting a wide range of AI application scenarios, including text processing, image understanding, and programming assistance.
|
package/README.zh-CN.md
CHANGED
@@ -209,8 +209,8 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
|
209
209
|
- **[ModelScope](https://lobechat.com/discover/provider/modelscope)**:
|
210
210
|
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs 为企业构建基础模型和人工智能系统,加速生成性人工智能在生产中的应用。
|
211
211
|
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage 专注于为各种商业需求开发 AI 模型,包括 Solar LLM 和文档 AI,旨在实现工作的人造通用智能(AGI)。通过 Chat API 创建简单的对话代理,并支持功能调用、翻译、嵌入以及特定领域应用。
|
212
|
-
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI 是一家致力于构建人工智能以加速人类科学发现的公司。我们的使命是推动我们对宇宙的共同理解。
|
213
|
-
- **[
|
212
|
+
- **[xAI (Grok)](https://lobechat.com/discover/provider/xai)**: xAI 是一家致力于构建人工智能以加速人类科学发现的公司。我们的使命是推动我们对宇宙的共同理解。
|
213
|
+
- **[Aliyun Bailian](https://lobechat.com/discover/provider/qwen)**: 通义千问是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。
|
214
214
|
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: 企业级一站式大模型与 AI 原生应用开发及服务平台,提供最全面易用的生成式人工智能模型开发、应用开发全流程工具链
|
215
215
|
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: 由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力
|
216
216
|
- **[ZhiPu](https://lobechat.com/discover/provider/zhipu)**: 智谱 AI 提供多模态与语言模型的开放平台,支持广泛的 AI 应用场景,包括文本处理、图像理解与编程辅助等。
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,28 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"features": [
|
5
|
+
"Add more provider support for search & crawl."
|
6
|
+
],
|
7
|
+
"improvements": [
|
8
|
+
"Update modelscope models."
|
9
|
+
]
|
10
|
+
},
|
11
|
+
"date": "2025-06-03",
|
12
|
+
"version": "1.91.0"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"children": {
|
16
|
+
"improvements": [
|
17
|
+
"Rename the createOpenAICompatibleRuntime."
|
18
|
+
],
|
19
|
+
"fixes": [
|
20
|
+
"Update the clerk middleware to support route protection."
|
21
|
+
]
|
22
|
+
},
|
23
|
+
"date": "2025-06-02",
|
24
|
+
"version": "1.90.4"
|
25
|
+
},
|
2
26
|
{
|
3
27
|
"children": {
|
4
28
|
"improvements": [
|
@@ -19,7 +19,7 @@ You can use `+` to add a model, `-` to hide a model, and use `model name->deploy
|
|
19
19
|
```text
|
20
20
|
id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOutput>,model2,model3
|
21
21
|
```
|
22
|
-
The deploymentName `->deploymentName` can be omitted, and it defaults to the latest model version. Currently, the model service providers that support `->deploymentName` are: Azure and
|
22
|
+
The deploymentName `->deploymentName` can be omitted, and it defaults to the latest model version. Currently, the model service providers that support `->deploymentName` are: Azure, Volcengine and Qwen.
|
23
23
|
|
24
24
|
For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
|
25
25
|
|
@@ -18,7 +18,7 @@ LobeChat 支持在部署时自定义模型列表,详情请参考 [模型提供
|
|
18
18
|
```text
|
19
19
|
id->deploymentName=displayName<maxToken:vision:reasoning:search:fc:file:imageOutput>,model2,model3
|
20
20
|
```
|
21
|
-
部署名`->deploymentName`可以省略,默认为最新版本的模型。当前支持`->deploymentName`的模型服务商有:Azure和
|
21
|
+
部署名`->deploymentName`可以省略,默认为最新版本的模型。当前支持`->deploymentName`的模型服务商有:Azure、Volcengine和Qwen。
|
22
22
|
|
23
23
|
例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
|
24
24
|
|
@@ -458,9 +458,9 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
|
|
458
458
|
### `QWEN_MODEL_LIST`
|
459
459
|
|
460
460
|
- Type: Optional
|
461
|
-
- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]
|
461
|
+
- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name->deploymentName=display_name` to customize the display name of a model, separated by commas. The deploymentName `->deploymentName` can be omitted, and it defaults to the latest model version. Definition syntax rules see [model-list][model-list]
|
462
462
|
- Default: `-`
|
463
|
-
- Example: `-all,+qwen-turbo
|
463
|
+
- Example: `-all,+qwen-turbo,+qwen-plus,+qwen-max->qwen-max-2025-01-25`
|
464
464
|
|
465
465
|
### `QWEN_PROXY_URL`
|
466
466
|
|
@@ -456,9 +456,9 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
|
|
456
456
|
### `QWEN_MODEL_LIST`
|
457
457
|
|
458
458
|
- 类型:可选
|
459
|
-
- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用
|
459
|
+
- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名->部署名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。部署名`->部署名`可以省略,默认为最新版本的模型。模型定义语法规则见 [模型列表][model-list]
|
460
460
|
- 默认值:`-`
|
461
|
-
- 示例:`-all,+qwen-turbo
|
461
|
+
- 示例:`-all,+qwen-turbo,+qwen-plus,+qwen-max->qwen-max-2025-01-25`
|
462
462
|
|
463
463
|
### `QWEN_PROXY_URL`
|
464
464
|
|