@lobehub/chat 1.19.8 → 1.19.10
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.
Potentially problematic release.
This version of @lobehub/chat might be problematic. Click here for more details.
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.19.10](https://github.com/lobehub/lobe-chat/compare/v1.19.9...v1.19.10)
|
6
|
+
|
7
|
+
<sup>Released on **2024-09-20**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Add qwen2.5 math and coder model for siliconcloud provider.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Add qwen2.5 math and coder model for siliconcloud provider, closes [#4043](https://github.com/lobehub/lobe-chat/issues/4043) ([d16578f](https://github.com/lobehub/lobe-chat/commit/d16578f))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.19.9](https://github.com/lobehub/lobe-chat/compare/v1.19.8...v1.19.9)
|
31
|
+
|
32
|
+
<sup>Released on **2024-09-20**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix a bug with server agent config when user not exist.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Fix a bug with server agent config when user not exist, closes [#4034](https://github.com/lobehub/lobe-chat/issues/4034) ([f6a232b](https://github.com/lobehub/lobe-chat/commit/f6a232b))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.19.8](https://github.com/lobehub/lobe-chat/compare/v1.19.7...v1.19.8)
|
6
56
|
|
7
57
|
<sup>Released on **2024-09-19**</sup>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.19.
|
3
|
+
"version": "1.19.10",
|
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",
|
@@ -28,6 +28,7 @@ export const POST = async (req: Request): Promise<NextResponse> => {
|
|
28
28
|
const userService = new UserService();
|
29
29
|
switch (type) {
|
30
30
|
case 'user.created': {
|
31
|
+
pino.info('creating user due to clerk webhook');
|
31
32
|
return userService.createUser(data.id, data);
|
32
33
|
}
|
33
34
|
case 'user.deleted': {
|
@@ -62,14 +62,27 @@ const SiliconCloud: ModelProviderCard = {
|
|
62
62
|
tokens: 32_768,
|
63
63
|
},
|
64
64
|
{
|
65
|
-
description: 'Qwen2-Math 专注于数学领域的问题求解,为高难度题提供专业解答。',
|
66
|
-
displayName: 'Qwen2 Math 72B',
|
67
|
-
|
65
|
+
description: 'Qwen2.5-Math 专注于数学领域的问题求解,为高难度题提供专业解答。',
|
66
|
+
displayName: 'Qwen2.5 Math 72B',
|
67
|
+
enabled: true,
|
68
|
+
id: 'Qwen/Qwen2.5-Math-72B-Instruct',
|
68
69
|
pricing: {
|
69
70
|
currency: 'CNY',
|
70
71
|
input: 4.13,
|
71
72
|
output: 4.13,
|
72
73
|
},
|
74
|
+
tokens: 4096,
|
75
|
+
},
|
76
|
+
{
|
77
|
+
description: 'Qwen2.5-Coder 专注于代码编写。',
|
78
|
+
displayName: 'Qwen2.5 Coder 7B',
|
79
|
+
enabled: true,
|
80
|
+
id: 'Qwen/Qwen2.5-Coder-7B-Instruct',
|
81
|
+
pricing: {
|
82
|
+
currency: 'CNY',
|
83
|
+
input: 0,
|
84
|
+
output: 0,
|
85
|
+
},
|
73
86
|
tokens: 32_768,
|
74
87
|
},
|
75
88
|
{
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
|
3
3
|
import { INBOX_SESSION_ID } from '@/const/session';
|
4
|
+
import { DEFAULT_AGENT_CONFIG } from '@/const/settings';
|
4
5
|
import { AgentModel } from '@/database/server/models/agent';
|
5
6
|
import { FileModel } from '@/database/server/models/file';
|
6
7
|
import { KnowledgeBaseModel } from '@/database/server/models/knowledgeBase';
|
7
8
|
import { SessionModel } from '@/database/server/models/session';
|
9
|
+
import { UserModel } from '@/database/server/models/user';
|
8
10
|
import { pino } from '@/libs/logger';
|
9
11
|
import { authedProcedure, router } from '@/libs/trpc';
|
10
12
|
import { KnowledgeItem, KnowledgeType } from '@/types/knowledgeBase';
|
@@ -84,6 +86,10 @@ export const agentRouter = router({
|
|
84
86
|
const item = await ctx.sessionModel.findByIdOrSlug(INBOX_SESSION_ID);
|
85
87
|
// if there is no session for user, create one
|
86
88
|
if (!item) {
|
89
|
+
// if there is no user, return default config
|
90
|
+
const user = await UserModel.findById(ctx.userId);
|
91
|
+
if (!user) return DEFAULT_AGENT_CONFIG;
|
92
|
+
|
87
93
|
const res = await ctx.sessionModel.createInbox();
|
88
94
|
pino.info('create inbox session', res);
|
89
95
|
}
|