@lobehub/chat 1.74.8 → 1.74.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.74.10](https://github.com/lobehub/lobe-chat/compare/v1.74.9...v1.74.10)
6
+
7
+ <sup>Released on **2025-03-25**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Add `hunyuan-t1-latest` from Hunyuan.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Add `hunyuan-t1-latest` from Hunyuan, closes [#7123](https://github.com/lobehub/lobe-chat/issues/7123) ([8377c6b](https://github.com/lobehub/lobe-chat/commit/8377c6b))
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.74.9](https://github.com/lobehub/lobe-chat/compare/v1.74.8...v1.74.9)
31
+
32
+ <sup>Released on **2025-03-25**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Add reject pattern for browserless to boost crawl performance.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: Add reject pattern for browserless to boost crawl performance, closes [#6996](https://github.com/lobehub/lobe-chat/issues/6996) ([184a1ba](https://github.com/lobehub/lobe-chat/commit/184a1ba))
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.74.8](https://github.com/lobehub/lobe-chat/compare/v1.74.7...v1.74.8)
6
56
 
7
57
  <sup>Released on **2025-03-24**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Add hunyuan-t1-latest from Hunyuan."
6
+ ]
7
+ },
8
+ "date": "2025-03-25",
9
+ "version": "1.74.10"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Add reject pattern for browserless to boost crawl performance."
15
+ ]
16
+ },
17
+ "date": "2025-03-25",
18
+ "version": "1.74.9"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.74.8",
3
+ "version": "1.74.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",
@@ -153,7 +153,7 @@
153
153
  "@vercel/speed-insights": "^1.1.0",
154
154
  "ahooks": "^3.8.4",
155
155
  "ai": "^3.4.33",
156
- "antd": "^5.23.0",
156
+ "antd": "^5.24.4",
157
157
  "antd-style": "^3.7.1",
158
158
  "brotli-wasm": "^3.0.1",
159
159
  "chroma-js": "^3.1.2",
@@ -5,6 +5,9 @@ import { CrawlImpl, CrawlSuccessResult } from '../type';
5
5
  import { htmlToMarkdown } from '../utils/htmlToMarkdown';
6
6
 
7
7
  const BASE_URL = process.env.BROWSERLESS_URL ?? 'https://chrome.browserless.io';
8
+ // Allowed file types: html, css, js, json, xml, webmanifest, txt, md
9
+ const REJECT_REQUEST_PATTERN =
10
+ '.*\\.(?!(html|css|js|json|xml|webmanifest|txt|md)(\\?|#|$))[\\w-]+(?:[\\?#].*)?$';
8
11
  const BROWSERLESS_TOKEN = process.env.BROWSERLESS_TOKEN;
9
12
 
10
13
  class BrowserlessInitError extends Error {
@@ -21,6 +24,7 @@ export const browserless: CrawlImpl = async (url, { filterOptions }) => {
21
24
 
22
25
  const input = {
23
26
  gotoOptions: { waitUntil: 'networkidle2' },
27
+ rejectRequestPattern: [REJECT_REQUEST_PATTERN],
24
28
  url,
25
29
  };
26
30
 
@@ -3,6 +3,51 @@ import { AIChatModelCard } from '@/types/aiModel';
3
3
  // https://cloud.tencent.com/document/product/1729/104753
4
4
 
5
5
  const hunyuanChatModels: AIChatModelCard[] = [
6
+ {
7
+ abilities: {
8
+ reasoning: true,
9
+ search: true,
10
+ },
11
+ contextWindowTokens: 92_000,
12
+ description:
13
+ '业内首个超大规模 Hybrid-Transformer-Mamba 推理模型,扩展推理能力,超强解码速度,进一步对齐人类偏好。',
14
+ displayName: 'Hunyuan T1',
15
+ enabled: true,
16
+ id: 'hunyuan-t1-latest',
17
+ maxOutput: 64_000,
18
+ pricing: {
19
+ currency: 'CNY',
20
+ input: 1,
21
+ output: 4,
22
+ },
23
+ releasedAt: '2025-03-21',
24
+ settings: {
25
+ searchImpl: 'params',
26
+ },
27
+ type: 'chat',
28
+ },
29
+ {
30
+ abilities: {
31
+ reasoning: true,
32
+ search: true,
33
+ },
34
+ contextWindowTokens: 92_000,
35
+ description:
36
+ '全面搭建模型文理科能力,长文本信息捕捉能力强。支持推理解答各种难度的数学/逻辑推理/科学/代码等科学问题。',
37
+ displayName: 'Hunyuan T1 20250321',
38
+ id: 'hunyuan-t1-20250321',
39
+ maxOutput: 64_000,
40
+ pricing: {
41
+ currency: 'CNY',
42
+ input: 1,
43
+ output: 4,
44
+ },
45
+ releasedAt: '2025-03-21',
46
+ settings: {
47
+ searchImpl: 'params',
48
+ },
49
+ type: 'chat',
50
+ },
6
51
  {
7
52
  contextWindowTokens: 256_000,
8
53
  description:
@@ -40,6 +40,10 @@ export const LobeHunyuanAI = LobeOpenAICompatibleFactory({
40
40
  'hunyuan-pro',
41
41
  ];
42
42
 
43
+ const reasoningKeywords = [
44
+ 'hunyuan-t1',
45
+ ];
46
+
43
47
  const modelsPage = await client.models.list() as any;
44
48
  const modelList: HunyuanModelCard[] = modelsPage.data;
45
49
 
@@ -57,7 +61,8 @@ export const LobeHunyuanAI = LobeOpenAICompatibleFactory({
57
61
  || false,
58
62
  id: model.id,
59
63
  reasoning:
60
- knownModel?.abilities?.reasoning
64
+ reasoningKeywords.some(keyword => model.id.toLowerCase().includes(keyword))
65
+ || knownModel?.abilities?.reasoning
61
66
  || false,
62
67
  vision:
63
68
  model.id.toLowerCase().includes('vision')