@lobehub/chat 1.14.9 → 1.14.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.14.11](https://github.com/lobehub/lobe-chat/compare/v1.14.10...v1.14.11)
6
+
7
+ <sup>Released on **2024-08-30**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Update Stepfun models info.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Update Stepfun models info, closes [#3685](https://github.com/lobehub/lobe-chat/issues/3685) ([478b40a](https://github.com/lobehub/lobe-chat/commit/478b40a))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 1.14.10](https://github.com/lobehub/lobe-chat/compare/v1.14.9...v1.14.10)
31
+
32
+ <sup>Released on **2024-08-30**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix file relative chunks.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix file relative chunks, closes [#3676](https://github.com/lobehub/lobe-chat/issues/3676) ([afe1906](https://github.com/lobehub/lobe-chat/commit/afe1906))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.14.9](https://github.com/lobehub/lobe-chat/compare/v1.14.8...v1.14.9)
6
56
 
7
57
  <sup>Released on **2024-08-29**</sup>
package/README.md CHANGED
@@ -268,6 +268,7 @@ Our marketplace is not just a showcase platform but also a collaborative space.
268
268
 
269
269
  | Recent Submits | Description |
270
270
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
271
+ | [International Lyricist](https://chat-preview.lobehub.com/market?agent=letrista-internacional)<br/><sup>By **[mnector](https://github.com/mnector)** on **2024-08-29**</sup> | Specialized in writing lyrics for songs in Spanish, English, and French, with a focus on storytelling and the emotions of the provided content.<br/>`lyricism` `translation` `music` |
271
272
  | [Backtracking Question Expert](https://chat-preview.lobehub.com/market?agent=step-back-expert)<br/><sup>By **[tiny656](https://github.com/tiny656)** on **2024-08-27**</sup> | Hello! I am an expert in world knowledge, skilled in using backtracking questioning strategies to help you gain a deeper understanding and analysis of issues. Please enter a question, and I will respond to it according to the following process: |
272
273
 
273
274
  1. Provide at least 3 optional backtracking questions that align with the strategy.
@@ -277,9 +278,8 @@ Our marketplace is not just a showcase platform but also a collaborative space.
277
278
  Please tell me what issue you would like to explore?<br/>`backtracking-questions` `thinking-strategies` `problem-analysis` |
278
279
  \| [Unreal Engine Master](https://chat-preview.lobehub.com/market?agent=unreal-engine-master)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-27**</sup> | Unreal Game Development Companion<br/>`game-development` `unreal-engine` `software-engineering` |
279
280
  \| [TypeScript Solution Architect](https://chat-preview.lobehub.com/market?agent=typescript-developer)<br/><sup>By **[swarfte](https://github.com/swarfte)** on **2024-08-24**</sup> | Expert in TypeScript, Node.js, Vue.js 3, Nuxt.js 3, Express.js, React.js, and modern UI libraries.<br/>`type-script` `java-script` `web-development` `coding-standards` `best-practices` |
280
- \| [Variable Name Conversion Expert](https://chat-preview.lobehub.com/market?agent=variable-name-conversion)<br/><sup>By **[zengyishou](https://github.com/zengyishou)** on **2024-08-21**</sup> | In software development, naming variables is a common yet relatively time-consuming task. This assistant can automatically convert Chinese variable names into English variable names that conform to camelCase, PascalCase, snake_case, kebab-case, and constant naming conventions based on specific naming rules. This not only improves code readability but also alleviates the frustration of variable naming.<br/>`software-development` `variable-naming` `chinese-to-english` `code-standards` `automatic-conversion` |
281
281
 
282
- > 📊 Total agents: [<kbd>**319**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
282
+ > 📊 Total agents: [<kbd>**321**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
283
283
 
284
284
  <!-- AGENT LIST -->
285
285
 
package/README.zh-CN.md CHANGED
@@ -254,9 +254,10 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
254
254
 
255
255
  <!-- AGENT LIST -->
256
256
 
257
- | 最近新增 | 助手说明 |
258
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
259
- | [后退提问专家](https://chat-preview.lobehub.com/market?agent=step-back-expert)<br/><sup>By **[tiny656](https://github.com/tiny656)** on **2024-08-27**</sup> | 你好!我是世界知识的专家,擅长用后退提问策略来帮助你更深入地理解和分析问题。请你输入一个问题,我会根据以下流程回答你的问题: |
257
+ | 最近新增 | 助手说明 |
258
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
259
+ | [国际歌词创作人](https://chat-preview.lobehub.com/market?agent=letrista-internacional)<br/><sup>By **[mnector](https://github.com/mnector)** on **2024-08-29**</sup> | 专注于为西班牙语、英语和法语歌曲创作歌词,着重于叙事和所提供内容的情感。<br/>`歌词创作` `翻译` `音乐` |
260
+ | [后退提问专家](https://chat-preview.lobehub.com/market?agent=step-back-expert)<br/><sup>By **[tiny656](https://github.com/tiny656)** on **2024-08-27**</sup> | 你好!我是世界知识的专家,擅长用后退提问策略来帮助你更深入地理解和分析问题。请你输入一个问题,我会根据以下流程回答你的问题: |
260
261
 
261
262
  1. 给出至少 3 个符合策略的可选后退提问。
262
263
  2. 分别回答这些后退提问。
@@ -265,9 +266,8 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
265
266
  请告诉我你想要探讨的问题是什么?<br/>`后退提问` `思考策略` `问题分析` |
266
267
  \| [虚幻引擎大师](https://chat-preview.lobehub.com/market?agent=unreal-engine-master)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-27**</sup> | 虚幻游戏开发助手<br/>`游戏开发` `虚幻引擎` `软件工程` |
267
268
  \| [TypeScript 解决方案架构师](https://chat-preview.lobehub.com/market?agent=typescript-developer)<br/><sup>By **[swarfte](https://github.com/swarfte)** on **2024-08-24**</sup> | 精通 TypeScript、Node.js、Vue.js 3、Nuxt.js 3、Express.js、React.js 和现代 UI 库。<br/>`类型脚本` `java-script` `网页开发` `编码标准` `最佳实践` |
268
- \| [开发变量名转换专家](https://chat-preview.lobehub.com/market?agent=variable-name-conversion)<br/><sup>By **[zengyishou](https://github.com/zengyishou)** on **2024-08-21**</sup> | 在软件开发过程中,命名变量是一项常见却相对耗时的任务。本助手能够根据特定的命名规则自动将中文变量名转换为符合小驼峰、大驼峰、下划线、横线以及常量命名规范的英文变量名。这不仅提高了代码的可读性,还解决了变量命名的苦恼。<br/>`软件开发` `变量命名` `中文转英文` `代码规范` `自动转换` |
269
269
 
270
- > 📊 Total agents: [<kbd>**319**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
270
+ > 📊 Total agents: [<kbd>**321**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
271
271
 
272
272
  <!-- AGENT LIST -->
273
273
 
@@ -59,7 +59,7 @@
59
59
  "status": {
60
60
  "error": "Chunking failed",
61
61
  "errorResult": "Chunking failed, please check and try again. Error detail:",
62
- "processing": "Chunking in progress.",
62
+ "processing": "Chunking",
63
63
  "processingTip": "The server is splitting text chunks; closing the page will not affect the chunking progress."
64
64
  }
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.14.9",
3
+ "version": "1.14.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",
@@ -9,7 +9,7 @@ const Qwen: ModelProviderCard = {
9
9
  enabled: true,
10
10
  functionCall: true,
11
11
  id: 'qwen-turbo',
12
- tokens: 8000,
12
+ tokens: 8192,
13
13
  },
14
14
  {
15
15
  description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入',
@@ -17,7 +17,7 @@ const Qwen: ModelProviderCard = {
17
17
  enabled: true,
18
18
  functionCall: true,
19
19
  id: 'qwen-plus',
20
- tokens: 32_000,
20
+ tokens: 32_768,
21
21
  },
22
22
  {
23
23
  description:
@@ -26,7 +26,7 @@ const Qwen: ModelProviderCard = {
26
26
  enabled: true,
27
27
  functionCall: true,
28
28
  id: 'qwen-max',
29
- tokens: 8000,
29
+ tokens: 8192,
30
30
  },
31
31
  {
32
32
  description:
@@ -34,13 +34,13 @@ const Qwen: ModelProviderCard = {
34
34
  displayName: 'Qwen Max LongContext',
35
35
  functionCall: true,
36
36
  id: 'qwen-max-longcontext',
37
- tokens: 30_000,
37
+ tokens: 32_768,
38
38
  },
39
39
  {
40
40
  description: '通义千问2对外开源的7B规模的模型',
41
41
  displayName: 'Qwen2 7B',
42
42
  id: 'qwen2-7b-instruct',
43
- tokens: 131_072,
43
+ tokens: 128_000,
44
44
  },
45
45
  {
46
46
  description: '通义千问2对外开源的57B规模14B激活参数的MOE模型',
@@ -52,7 +52,7 @@ const Qwen: ModelProviderCard = {
52
52
  description: '通义千问2对外开源的72B规模的模型',
53
53
  displayName: 'Qwen2 72B',
54
54
  id: 'qwen2-72b-instruct',
55
- tokens: 131_072,
55
+ tokens: 128_000,
56
56
  },
57
57
  {
58
58
  description:
@@ -4,20 +4,28 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const Stepfun: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
- enabled: true,
7
+ id: 'step-2-16k-nightly',
8
+ tokens: 16_384,
9
+ },
10
+ {
8
11
  id: 'step-1-256k',
9
- tokens: 32_768,
12
+ tokens: 256_000,
10
13
  },
11
14
  {
12
15
  enabled: true,
13
16
  id: 'step-1-128k',
14
- tokens: 32_768,
17
+ tokens: 128_000,
15
18
  },
16
19
  {
17
20
  enabled: true,
18
21
  id: 'step-1-32k',
19
22
  tokens: 32_768,
20
23
  },
24
+ {
25
+ enabled: true,
26
+ id: 'step-1-8k',
27
+ tokens: 8192,
28
+ },
21
29
  {
22
30
  enabled: true,
23
31
  id: 'step-1v-32k',
@@ -25,8 +33,10 @@ const Stepfun: ModelProviderCard = {
25
33
  vision: true,
26
34
  },
27
35
  {
28
- id: 'step-1-8k',
36
+ enabled: true,
37
+ id: 'step-1v-8k',
29
38
  tokens: 8192,
39
+ vision: true,
30
40
  },
31
41
  ],
32
42
  checkModel: 'step-1-8k',
@@ -23,7 +23,15 @@ const ZhiPu: ModelProviderCard = {
23
23
  tokens: 128_000,
24
24
  },
25
25
  {
26
- description: '智谱当前最先进最智能的模型,指令遵从能力大幅提升18.6%,发布于20240605',
26
+ description: '高智能旗舰:性能全面提升,长文本和复杂任务能力显著增强',
27
+ displayName: 'GLM-4-Plus',
28
+ enabled: true,
29
+ functionCall: true,
30
+ id: 'glm-4-plus',
31
+ tokens: 128_000,
32
+ },
33
+ {
34
+ description: '高智能模型:适用于处理高度复杂和多样化的任务',
27
35
  displayName: 'GLM-4-0520',
28
36
  enabled: true,
29
37
  functionCall: true,
@@ -31,7 +39,7 @@ const ZhiPu: ModelProviderCard = {
31
39
  tokens: 128_000,
32
40
  },
33
41
  {
34
- description: '发布于2024年1月16日的旧版旗舰模型,目前已被 GLM-4-0520 版本超越', // deprecated on 2025-06
42
+ description: '旧版旗舰:发布于2024年1月16日,目前已被 GLM-4-0520 取代', // deprecated on 2025-06
35
43
  displayName: 'GLM-4',
36
44
  functionCall: true,
37
45
  id: 'glm-4',
@@ -62,11 +70,20 @@ const ZhiPu: ModelProviderCard = {
62
70
  },
63
71
  {
64
72
  description:
65
- '实现了视觉语言特征的深度融合,支持视觉问答、图像字幕、视觉定位、复杂目标检测等各类图像理解任务',
73
+ '视频和图像理解:具备视频内容和多图片的理解能力',
74
+ displayName: 'GLM-4V-Plus',
75
+ enabled: true,
76
+ id: 'glm-4v-plus',
77
+ tokens: 8192,
78
+ vision: true,
79
+ },
80
+ {
81
+ description:
82
+ '图像理解:具备图像理解能力和推理能力',
66
83
  displayName: 'GLM-4V',
67
84
  enabled: true,
68
85
  id: 'glm-4v',
69
- tokens: 2000,
86
+ tokens: 2048,
70
87
  vision: true,
71
88
  },
72
89
  {
@@ -171,6 +171,10 @@ export class ChunkModel {
171
171
  }) {
172
172
  const similarity = sql<number>`1 - (${cosineDistance(embeddings.embeddings, embedding)})`;
173
173
 
174
+ const hasFiles = fileIds && fileIds.length > 0;
175
+
176
+ if (!hasFiles) return [];
177
+
174
178
  const result = await serverDB
175
179
  .select({
176
180
  fileId: files.id,
@@ -186,7 +190,7 @@ export class ChunkModel {
186
190
  .leftJoin(embeddings, eq(chunks.id, embeddings.chunkId))
187
191
  .leftJoin(fileChunks, eq(chunks.id, fileChunks.chunkId))
188
192
  .leftJoin(files, eq(files.id, fileChunks.fileId))
189
- .where(and(fileIds && fileIds.length > 0 ? inArray(fileChunks.fileId, fileIds) : undefined))
193
+ .where(inArray(fileChunks.fileId, fileIds))
190
194
  .orderBy((t) => desc(t.similarity))
191
195
  .limit(5);
192
196