@lobehub/chat 0.146.0 → 0.146.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 0.146.2](https://github.com/lobehub/lobe-chat/compare/v0.146.1...v0.146.2)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-10**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Pin `ai@3.0.19` to fix error with chat stream output.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Pin `ai@3.0.19` to fix error with chat stream output, closes [#1946](https://github.com/lobehub/lobe-chat/issues/1946) ([07d4419](https://github.com/lobehub/lobe-chat/commit/07d4419))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.146.1](https://github.com/lobehub/lobe-chat/compare/v0.146.0...v0.146.1)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-04-10**</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 0.146.0](https://github.com/lobehub/lobe-chat/compare/v0.145.13...v0.146.0)
|
|
6
48
|
|
|
7
49
|
<sup>Released on **2024-04-08**</sup>
|
package/README.md
CHANGED
|
@@ -259,14 +259,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
259
259
|
|
|
260
260
|
<!-- AGENT LIST -->
|
|
261
261
|
|
|
262
|
-
| Recent Submits
|
|
263
|
-
|
|
|
264
|
-
| [
|
|
265
|
-
| [
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
268
|
-
|
|
269
|
-
> 📊 Total agents: [<kbd>**
|
|
262
|
+
| Recent Submits | Description |
|
|
263
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
264
|
+
| [Design Philosophy Analysis](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | Helps you identify and analyze architectural design philosophies<br/>`arch` |
|
|
265
|
+
| [English Technology Article Reading Assistant](https://chat-preview.lobehub.com/market?agent=encn-fy)<br/><sup>By **[sangxgg](https://github.com/sangxgg)** on **2024-04-02**</sup> | A translator with rich translation experience, specializing in accurately and clearly translating various English technology articles into Simplified Chinese. Participated in the translation work of Simplified Chinese versions of publications such as National Geographic, Scientific American, InformationWeek, and TechCrunch Chinese. Has a unique understanding and skilled practice in in-depth interpretation and accurate translation of technology articles.<br/>`translation` `english-to-chinese-translation` `translation-of-english-technology-content` |
|
|
266
|
+
| [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | Experienced programmer skilled in multiple languages. Provides code solutions, guidance, and practical examples to help users achieve their programming goals. "I adore coding."<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
|
|
267
|
+
| [Blood Test Analyst](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | Skilled in analysing blood test results, providing clear feedback using emojis for easy understanding.<br/>`healthcare` `analysis` `results` `consulting` `summary` |
|
|
268
|
+
|
|
269
|
+
> 📊 Total agents: [<kbd>**227**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
270
270
|
|
|
271
271
|
<!-- AGENT LIST -->
|
|
272
272
|
|
package/README.zh-CN.md
CHANGED
|
@@ -247,14 +247,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
247
247
|
|
|
248
248
|
<!-- AGENT LIST -->
|
|
249
249
|
|
|
250
|
-
| 最近新增
|
|
251
|
-
|
|
|
252
|
-
| [
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
|
|
257
|
-
> 📊 Total agents: [<kbd>**
|
|
250
|
+
| 最近新增 | 助手说明 |
|
|
251
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
252
|
+
| [设计理念分析](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | 帮助你识图并分析建筑设计理念<br/>`arch` |
|
|
253
|
+
| [英文科技文章阅读助手](https://chat-preview.lobehub.com/market?agent=encn-fy)<br/><sup>By **[sangxgg](https://github.com/sangxgg)** on **2024-04-02**</sup> | 一位拥有丰富翻译经验的翻译家,擅长将各类英文科技文章准确且通俗易懂的翻译成简体中文。<br/>`翻译` `英文翻译中文` `英文科技内容翻译` |
|
|
254
|
+
| [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | 有经验的程序员,精通多种编程语言。提供代码解决方案、指导和实际示例,帮助用户实现他们的编程目标。"我热爱编程。"<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
|
|
255
|
+
| [血液检测分析师](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | 擅长分析血液检测结果,使用表情符号提供清晰反馈,便于理解。<br/>`医疗保健` `分析` `结果` `咨询` `摘要` |
|
|
256
|
+
|
|
257
|
+
> 📊 Total agents: [<kbd>**227**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
258
258
|
|
|
259
259
|
<!-- AGENT LIST -->
|
|
260
260
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.146.
|
|
3
|
+
"version": "0.146.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",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@vercel/analytics": "^1",
|
|
96
96
|
"@vercel/speed-insights": "^1.0.10",
|
|
97
97
|
"ahooks": "^3",
|
|
98
|
-
"ai": "
|
|
98
|
+
"ai": "3.0.19",
|
|
99
99
|
"antd": "^5",
|
|
100
100
|
"antd-style": "^3",
|
|
101
101
|
"brotli-wasm": "^2",
|
|
@@ -24,26 +24,27 @@ afterEach(() => {
|
|
|
24
24
|
|
|
25
25
|
describe('LobeAnthropicAI', () => {
|
|
26
26
|
describe('init', () => {
|
|
27
|
-
|
|
28
27
|
it('should correctly initialize with an API key', async () => {
|
|
29
28
|
const instance = new LobeAnthropicAI({ apiKey: 'test_api_key' });
|
|
30
29
|
expect(instance).toBeInstanceOf(LobeAnthropicAI);
|
|
31
30
|
expect(instance.baseURL).toBe('https://api.anthropic.com');
|
|
32
31
|
});
|
|
33
|
-
|
|
32
|
+
|
|
34
33
|
it('should correctly initialize with a baseURL', async () => {
|
|
35
|
-
const instance = new LobeAnthropicAI({
|
|
34
|
+
const instance = new LobeAnthropicAI({
|
|
35
|
+
apiKey: 'test_api_key',
|
|
36
|
+
baseURL: 'https://api.anthropic.proxy',
|
|
37
|
+
});
|
|
36
38
|
expect(instance).toBeInstanceOf(LobeAnthropicAI);
|
|
37
39
|
expect(instance.baseURL).toBe('https://api.anthropic.proxy');
|
|
38
40
|
});
|
|
39
|
-
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
describe('chat', () => {
|
|
43
44
|
it('should return a StreamingTextResponse on successful API call', async () => {
|
|
44
45
|
const result = await instance.chat({
|
|
45
46
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
46
|
-
model: 'claude-
|
|
47
|
+
model: 'claude-3-haiku-20240307',
|
|
47
48
|
temperature: 0,
|
|
48
49
|
});
|
|
49
50
|
|
|
@@ -65,7 +66,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
65
66
|
// Act
|
|
66
67
|
const result = await instance.chat({
|
|
67
68
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
68
|
-
model: 'claude-
|
|
69
|
+
model: 'claude-3-haiku-20240307',
|
|
69
70
|
temperature: 0,
|
|
70
71
|
top_p: 1,
|
|
71
72
|
});
|
|
@@ -74,7 +75,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
74
75
|
expect(instance['client'].messages.create).toHaveBeenCalledWith({
|
|
75
76
|
max_tokens: 4096,
|
|
76
77
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
77
|
-
model: 'claude-
|
|
78
|
+
model: 'claude-3-haiku-20240307',
|
|
78
79
|
stream: true,
|
|
79
80
|
temperature: 0,
|
|
80
81
|
top_p: 1,
|
|
@@ -99,7 +100,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
99
100
|
{ content: 'You are an awesome greeter', role: 'system' },
|
|
100
101
|
{ content: 'Hello', role: 'user' },
|
|
101
102
|
],
|
|
102
|
-
model: 'claude-
|
|
103
|
+
model: 'claude-3-haiku-20240307',
|
|
103
104
|
temperature: 0,
|
|
104
105
|
});
|
|
105
106
|
|
|
@@ -107,7 +108,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
107
108
|
expect(instance['client'].messages.create).toHaveBeenCalledWith({
|
|
108
109
|
max_tokens: 4096,
|
|
109
110
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
110
|
-
model: 'claude-
|
|
111
|
+
model: 'claude-3-haiku-20240307',
|
|
111
112
|
stream: true,
|
|
112
113
|
system: 'You are an awesome greeter',
|
|
113
114
|
temperature: 0,
|
|
@@ -130,7 +131,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
130
131
|
const result = await instance.chat({
|
|
131
132
|
max_tokens: 2048,
|
|
132
133
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
133
|
-
model: 'claude-
|
|
134
|
+
model: 'claude-3-haiku-20240307',
|
|
134
135
|
temperature: 0.5,
|
|
135
136
|
top_p: 1,
|
|
136
137
|
});
|
|
@@ -139,7 +140,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
139
140
|
expect(instance['client'].messages.create).toHaveBeenCalledWith({
|
|
140
141
|
max_tokens: 2048,
|
|
141
142
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
142
|
-
model: 'claude-
|
|
143
|
+
model: 'claude-3-haiku-20240307',
|
|
143
144
|
stream: true,
|
|
144
145
|
temperature: 0.5,
|
|
145
146
|
top_p: 1,
|
|
@@ -163,7 +164,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
163
164
|
frequency_penalty: 0.5, // Unsupported option
|
|
164
165
|
max_tokens: 2048,
|
|
165
166
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
166
|
-
model: 'claude-
|
|
167
|
+
model: 'claude-3-haiku-20240307',
|
|
167
168
|
presence_penalty: 0.5,
|
|
168
169
|
temperature: 0.5,
|
|
169
170
|
top_p: 1,
|
|
@@ -173,7 +174,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
173
174
|
expect(instance['client'].messages.create).toHaveBeenCalledWith({
|
|
174
175
|
max_tokens: 2048,
|
|
175
176
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
176
|
-
model: 'claude-
|
|
177
|
+
model: 'claude-3-haiku-20240307',
|
|
177
178
|
stream: true,
|
|
178
179
|
temperature: 0.5,
|
|
179
180
|
top_p: 1,
|
|
@@ -209,7 +210,7 @@ describe('LobeAnthropicAI', () => {
|
|
|
209
210
|
// Act
|
|
210
211
|
await instance.chat({
|
|
211
212
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
212
|
-
model: 'claude-
|
|
213
|
+
model: 'claude-3-haiku-20240307',
|
|
213
214
|
temperature: 0,
|
|
214
215
|
});
|
|
215
216
|
|
|
@@ -239,16 +240,16 @@ describe('LobeAnthropicAI', () => {
|
|
|
239
240
|
// Act
|
|
240
241
|
await instance.chat({
|
|
241
242
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
242
|
-
model: 'claude-
|
|
243
|
+
model: 'claude-3-haiku-20240307',
|
|
243
244
|
temperature: 0,
|
|
244
245
|
});
|
|
245
246
|
} catch (e) {
|
|
246
247
|
// Assert
|
|
247
248
|
expect(e).toEqual({
|
|
248
|
-
endpoint:
|
|
249
|
+
endpoint: 'https://api.anthropic.com',
|
|
249
250
|
error: apiError,
|
|
250
251
|
errorType: 'InvalidAnthropicAPIKey',
|
|
251
|
-
provider
|
|
252
|
+
provider,
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
255
|
});
|
|
@@ -270,16 +271,16 @@ describe('LobeAnthropicAI', () => {
|
|
|
270
271
|
// Act
|
|
271
272
|
await instance.chat({
|
|
272
273
|
messages: [{ content: 'Hello', role: 'user' }],
|
|
273
|
-
model: 'claude-
|
|
274
|
+
model: 'claude-3-haiku-20240307',
|
|
274
275
|
temperature: 0,
|
|
275
276
|
});
|
|
276
277
|
} catch (e) {
|
|
277
278
|
// Assert
|
|
278
279
|
expect(e).toEqual({
|
|
279
|
-
endpoint:
|
|
280
|
+
endpoint: 'https://api.anthropic.com',
|
|
280
281
|
error: apiError,
|
|
281
282
|
errorType: 'AnthropicBizError',
|
|
282
|
-
provider
|
|
283
|
+
provider,
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
286
|
});
|