@lobehub/chat 1.33.1 → 1.33.3
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,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.33.3](https://github.com/lobehub/lobe-chat/compare/v1.33.2...v1.33.3)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-25**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix `fetchOnClient` functional for Moonshot.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix `fetchOnClient` functional for Moonshot, closes [#4787](https://github.com/lobehub/lobe-chat/issues/4787) ([bef89a7](https://github.com/lobehub/lobe-chat/commit/bef89a7))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.33.2](https://github.com/lobehub/lobe-chat/compare/v1.33.1...v1.33.2)
|
31
|
+
|
32
|
+
<sup>Released on **2024-11-25**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix multi-turns tools calling.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Fix multi-turns tools calling, closes [#4789](https://github.com/lobehub/lobe-chat/issues/4789) ([9d8845f](https://github.com/lobehub/lobe-chat/commit/9d8845f))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.33.1](https://github.com/lobehub/lobe-chat/compare/v1.33.0...v1.33.1)
|
6
56
|
|
7
57
|
<sup>Released on **2024-11-25**</sup>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.33.
|
3
|
+
"version": "1.33.3",
|
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",
|
package/src/services/chat.ts
CHANGED
@@ -106,18 +106,12 @@ export function initializeWithClientStore(provider: string, payload: any) {
|
|
106
106
|
};
|
107
107
|
break;
|
108
108
|
}
|
109
|
-
case ModelProvider.ZhiPu: {
|
110
|
-
break;
|
111
|
-
}
|
112
109
|
case ModelProvider.Google: {
|
113
110
|
providerOptions = {
|
114
111
|
baseURL: providerAuthPayload?.endpoint,
|
115
112
|
};
|
116
113
|
break;
|
117
114
|
}
|
118
|
-
case ModelProvider.Moonshot: {
|
119
|
-
break;
|
120
|
-
}
|
121
115
|
case ModelProvider.Bedrock: {
|
122
116
|
if (providerAuthPayload?.apiKey) {
|
123
117
|
providerOptions = {
|
@@ -142,20 +136,12 @@ export function initializeWithClientStore(provider: string, payload: any) {
|
|
142
136
|
};
|
143
137
|
break;
|
144
138
|
}
|
145
|
-
case ModelProvider.Qwen: {
|
146
|
-
break;
|
147
|
-
}
|
148
|
-
|
149
139
|
case ModelProvider.Anthropic: {
|
150
140
|
providerOptions = {
|
151
141
|
baseURL: providerAuthPayload?.endpoint,
|
152
142
|
};
|
153
143
|
break;
|
154
144
|
}
|
155
|
-
|
156
|
-
case ModelProvider.Mistral: {
|
157
|
-
break;
|
158
|
-
}
|
159
145
|
case ModelProvider.Groq: {
|
160
146
|
providerOptions = {
|
161
147
|
apikey: providerAuthPayload?.apiKey,
|
@@ -163,18 +149,6 @@ export function initializeWithClientStore(provider: string, payload: any) {
|
|
163
149
|
};
|
164
150
|
break;
|
165
151
|
}
|
166
|
-
case ModelProvider.DeepSeek: {
|
167
|
-
break;
|
168
|
-
}
|
169
|
-
case ModelProvider.OpenRouter: {
|
170
|
-
break;
|
171
|
-
}
|
172
|
-
case ModelProvider.TogetherAI: {
|
173
|
-
break;
|
174
|
-
}
|
175
|
-
case ModelProvider.ZeroOne: {
|
176
|
-
break;
|
177
|
-
}
|
178
152
|
case ModelProvider.Cloudflare: {
|
179
153
|
providerOptions = {
|
180
154
|
apikey: providerAuthPayload?.apiKey,
|
@@ -207,7 +207,7 @@ export const generateAIChat: StateCreator<
|
|
207
207
|
}
|
208
208
|
|
209
209
|
// Get the current messages to generate AI response
|
210
|
-
const messages = chatSelectors.
|
210
|
+
const messages = chatSelectors.activeBaseChats(get());
|
211
211
|
const userFiles = chatSelectors.currentUserFiles(get()).map((f) => f.id);
|
212
212
|
|
213
213
|
await internal_coreProcessMessage(messages, id, {
|
@@ -484,7 +484,7 @@ export const generateAIChat: StateCreator<
|
|
484
484
|
|
485
485
|
internal_resendMessage: async (messageId, traceId) => {
|
486
486
|
// 1. 构造所有相关的历史记录
|
487
|
-
const chats = chatSelectors.
|
487
|
+
const chats = chatSelectors.activeBaseChats(get());
|
488
488
|
|
489
489
|
const currentIndex = chats.findIndex((c) => c.id === messageId);
|
490
490
|
if (currentIndex < 0) return;
|
@@ -232,6 +232,19 @@ describe('chatSelectors', () => {
|
|
232
232
|
});
|
233
233
|
});
|
234
234
|
|
235
|
+
describe('mainDisplayChats', () => {
|
236
|
+
it('should return existing messages except tool message', () => {
|
237
|
+
const state = merge(initialStore, {
|
238
|
+
messagesMap: {
|
239
|
+
[messageMapKey('someActiveId')]: mockMessages,
|
240
|
+
},
|
241
|
+
activeId: 'someActiveId',
|
242
|
+
});
|
243
|
+
const chats = chatSelectors.mainDisplayChats(state);
|
244
|
+
expect(chats).toEqual(mockedChats.slice(0, 2));
|
245
|
+
});
|
246
|
+
});
|
247
|
+
|
235
248
|
describe('chatsMessageString', () => {
|
236
249
|
it('should concatenate the contents of all messages returned by currentChatsWithHistoryConfig', () => {
|
237
250
|
// Prepare a state with a few messages
|