@lobehub/chat 1.26.1 → 1.26.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 +58 -0
- package/README.md +8 -8
- package/README.zh-CN.md +2 -2
- package/docs/usage/agents/model.mdx +1 -1
- package/package.json +1 -1
- package/src/app/(main)/@nav/_layout/Desktop/PinList/index.tsx +3 -1
- package/src/app/(main)/chat/@session/features/SessionListContent/Inbox/index.tsx +1 -1
- package/src/app/(main)/chat/@session/features/SessionListContent/List/index.tsx +1 -1
- package/src/config/modelProviders/sensenova.ts +3 -0
- package/src/{app/(main)/chat/@session/features/SessionListContent → hooks}/useSwitchSession.ts +5 -2
- package/src/libs/agent-runtime/huggingface/index.ts +2 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,64 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.26.3](https://github.com/lobehub/lobe-chat/compare/v1.26.2...v1.26.3)
|
6
|
+
|
7
|
+
<sup>Released on **2024-10-28**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix Huggingface API interrupting when the output exceeds 140 tokens.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Remove SenseChat-Vision model, due to model limitation.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's fixed
|
23
|
+
|
24
|
+
- **misc**: Fix Huggingface API interrupting when the output exceeds 140 tokens, closes [#4524](https://github.com/lobehub/lobe-chat/issues/4524) ([49acdd7](https://github.com/lobehub/lobe-chat/commit/49acdd7))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Remove SenseChat-Vision model, due to model limitation, closes [#4493](https://github.com/lobehub/lobe-chat/issues/4493) ([2aea033](https://github.com/lobehub/lobe-chat/commit/2aea033))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
38
|
+
### [Version 1.26.2](https://github.com/lobehub/lobe-chat/compare/v1.26.1...v1.26.2)
|
39
|
+
|
40
|
+
<sup>Released on **2024-10-28**</sup>
|
41
|
+
|
42
|
+
#### 🐛 Bug Fixes
|
43
|
+
|
44
|
+
- **misc**: Fix page not switch when clicking on the pin assistant.
|
45
|
+
|
46
|
+
<br/>
|
47
|
+
|
48
|
+
<details>
|
49
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
50
|
+
|
51
|
+
#### What's fixed
|
52
|
+
|
53
|
+
- **misc**: Fix page not switch when clicking on the pin assistant, closes [#4521](https://github.com/lobehub/lobe-chat/issues/4521) ([30b424a](https://github.com/lobehub/lobe-chat/commit/30b424a))
|
54
|
+
|
55
|
+
</details>
|
56
|
+
|
57
|
+
<div align="right">
|
58
|
+
|
59
|
+
[](#readme-top)
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
5
63
|
### [Version 1.26.1](https://github.com/lobehub/lobe-chat/compare/v1.26.0...v1.26.1)
|
6
64
|
|
7
65
|
<sup>Released on **2024-10-27**</sup>
|
package/README.md
CHANGED
@@ -285,14 +285,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
288
|
-
| Recent Submits | Description
|
289
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
290
|
-
| [
|
291
|
-
| [
|
292
|
-
| [
|
293
|
-
| [
|
294
|
-
|
295
|
-
> 📊 Total agents: [<kbd>**
|
288
|
+
| Recent Submits | Description |
|
289
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
290
|
+
| [Vector Logo Generator](https://chat-preview.lobehub.com/market?agent=svg-logo)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-10-27**</sup> | Specializing in UI/UX design and logo creation<br/>`ui-ux-design` `logo-design` `user-needs` `interaction-design` `tool-usage` |
|
291
|
+
| [Algorithm Answer Mentor](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | Specializes in LeetCode algorithm solutions and user guidance<br/>`algorithm` `problem-solving` `programming` `education` |
|
292
|
+
| [Psychologist](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | An experienced psychologist, warmly and patiently listening to your story.<br/>`psychological-counseling` `consultation` `sharing` `friendly` `doctor` `counselor` |
|
293
|
+
| [Boxing Training Master](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | Expert in boxing training guidance and personalized plan development<br/>`boxing-training` `personalized-plans` `fitness-guidance` `progress-evaluation` `technique-improvement` `health-and-nutrition` |
|
294
|
+
|
295
|
+
> 📊 Total agents: [<kbd>**421**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
296
296
|
|
297
297
|
<!-- AGENT LIST -->
|
298
298
|
|
package/README.zh-CN.md
CHANGED
@@ -276,12 +276,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
276
276
|
|
277
277
|
| 最近新增 | 助手说明 |
|
278
278
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
279
|
+
| [矢量 Logo 生成器](https://chat-preview.lobehub.com/market?agent=svg-logo)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-10-27**</sup> | 擅长 UI/UX 设计与 Logo 创作<br/>`ui-ux设计` `logo设计` `用户需求` `交互设计` `工具使用` |
|
279
280
|
| [算法解答导师](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | 擅长 LeetCode 算法解答与用户指导<br/>`算法` `解题` `编程` `教育` |
|
280
281
|
| [心理咨询师](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | 一个资深心理医生,温暖和耐心的倾听你的故事。<br/>`心理咨询` `咨询` `倾述` `友好` `医生` `咨询师` |
|
281
282
|
| [拳击训练大师](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | 擅长拳击训练指导与个性化计划制定<br/>`拳击训练` `个性化计划` `健身指导` `进度评估` `技术提升` `健康与营养` |
|
282
|
-
| [椰子](https://chat-preview.lobehub.com/market?agent=deep-thinker-ai)<br/><sup>By **[hia1234](https://github.com/hia1234)** on **2024-10-15**</sup> | 在自己的回答中进行多次审查,确保聊天机器人所说的话有依据,并积极请求反馈,反复进行互动<br/>`编程` `一般` |
|
283
283
|
|
284
|
-
> 📊 Total agents: [<kbd>**
|
284
|
+
> 📊 Total agents: [<kbd>**421**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
@@ -17,7 +17,7 @@ tags:
|
|
17
17
|
## ChatGPT
|
18
18
|
|
19
19
|
- **gpt-3.5-turbo**: Currently the fastest generating ChatGPT model, it is faster but may sacrifice some text quality, with a context length of 4k.
|
20
|
-
- **gpt-4**: ChatGPT 4.0 has improved language understanding and generation capabilities compared to 3.5. It can better understand context and
|
20
|
+
- **gpt-4**: ChatGPT 4.0 has improved language understanding and generation capabilities compared to 3.5. It can better understand context and generate more accurate and natural responses. This is thanks to improvements in the GPT-4 model, including better language modeling and deeper semantic understanding, but it may be slower than other models, with a context length of 8k.
|
21
21
|
- **gpt-4-32k**: Similar to gpt-4, the context limit is increased to 32k tokens, with a higher cost.
|
22
22
|
|
23
23
|
## Concept of Model Parameters
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.26.
|
3
|
+
"version": "1.26.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",
|
@@ -7,6 +7,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
8
8
|
|
9
9
|
import HotKeys from '@/components/HotKeys';
|
10
|
+
import { useSwitchSession } from '@/hooks/useSwitchSession';
|
10
11
|
import { useSessionStore } from '@/store/session';
|
11
12
|
import { sessionHelpers } from '@/store/session/helpers';
|
12
13
|
import { sessionSelectors } from '@/store/session/selectors';
|
@@ -29,7 +30,8 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
29
30
|
const PinList = () => {
|
30
31
|
const { styles, cx } = useStyles();
|
31
32
|
const list = useSessionStore(sessionSelectors.pinnedSessions, isEqual);
|
32
|
-
const [activeId
|
33
|
+
const [activeId] = useSessionStore((s) => [s.activeId]);
|
34
|
+
const switchSession = useSwitchSession();
|
33
35
|
|
34
36
|
const hasList = list.length > 0;
|
35
37
|
const [isPinned, setPinned] = useQueryState('pinned', parseAsBoolean);
|
@@ -5,11 +5,11 @@ import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { DEFAULT_INBOX_AVATAR } from '@/const/meta';
|
6
6
|
import { INBOX_SESSION_ID } from '@/const/session';
|
7
7
|
import { SESSION_CHAT_URL } from '@/const/url';
|
8
|
+
import { useSwitchSession } from '@/hooks/useSwitchSession';
|
8
9
|
import { useServerConfigStore } from '@/store/serverConfig';
|
9
10
|
import { useSessionStore } from '@/store/session';
|
10
11
|
|
11
12
|
import ListItem from '../ListItem';
|
12
|
-
import { useSwitchSession } from '../useSwitchSession';
|
13
13
|
|
14
14
|
const Inbox = memo(() => {
|
15
15
|
const { t } = useTranslation('chat');
|
@@ -7,13 +7,13 @@ import { Center } from 'react-layout-kit';
|
|
7
7
|
import LazyLoad from 'react-lazy-load';
|
8
8
|
|
9
9
|
import { SESSION_CHAT_URL } from '@/const/url';
|
10
|
+
import { useSwitchSession } from '@/hooks/useSwitchSession';
|
10
11
|
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
11
12
|
import { useSessionStore } from '@/store/session';
|
12
13
|
import { sessionSelectors } from '@/store/session/selectors';
|
13
14
|
import { LobeAgentSession } from '@/types/session';
|
14
15
|
|
15
16
|
import SkeletonList from '../../SkeletonList';
|
16
|
-
import { useSwitchSession } from '../useSwitchSession';
|
17
17
|
import AddButton from './AddButton';
|
18
18
|
import SessionItem from './Item';
|
19
19
|
|
@@ -17,6 +17,8 @@ const SenseNova: ModelProviderCard = {
|
|
17
17
|
},
|
18
18
|
tokens: 131_072,
|
19
19
|
},
|
20
|
+
/*
|
21
|
+
// Not compatible with local mode (Not support Base64 Image)
|
20
22
|
{
|
21
23
|
description: '最新版本模型 (V5.5),16K上下文长度,支持多图的输入,全面实现模型基础能力优化,在对象属性识别、空间关系、动作事件识别、场景理解、情感识别、逻辑常识推理和文本理解生成上都实现了较大提升。',
|
22
24
|
displayName: 'SenseChat 5.5 Vision',
|
@@ -30,6 +32,7 @@ const SenseNova: ModelProviderCard = {
|
|
30
32
|
tokens: 16_384,
|
31
33
|
vision: true,
|
32
34
|
},
|
35
|
+
*/
|
33
36
|
{
|
34
37
|
description: '适用于快速问答、模型微调场景',
|
35
38
|
displayName: 'SenseChat 5.0 Turbo',
|
package/src/{app/(main)/chat/@session/features/SessionListContent → hooks}/useSwitchSession.ts
RENAMED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { usePathname } from 'next/navigation';
|
1
2
|
import { useCallback } from 'react';
|
2
3
|
|
3
4
|
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
@@ -10,15 +11,17 @@ export const useSwitchSession = () => {
|
|
10
11
|
const togglePortal = useChatStore((s) => s.togglePortal);
|
11
12
|
const mobile = useServerConfigStore((s) => s.isMobile);
|
12
13
|
const router = useQueryRoute();
|
14
|
+
const pathname = usePathname();
|
13
15
|
|
14
16
|
return useCallback(
|
15
17
|
(id: string) => {
|
16
18
|
switchSession(id);
|
17
19
|
togglePortal(false);
|
18
20
|
|
19
|
-
|
21
|
+
const chatPath = '/chat';
|
22
|
+
if (mobile || pathname !== chatPath) {
|
20
23
|
setTimeout(() => {
|
21
|
-
router.push(
|
24
|
+
router.push(chatPath, {
|
22
25
|
query: { session: id, showMobileWorkspace: 'true' },
|
23
26
|
});
|
24
27
|
}, 50);
|
@@ -21,8 +21,10 @@ export const LobeHuggingFaceAI = LobeOpenAICompatibleFactory({
|
|
21
21
|
},
|
22
22
|
customClient: {
|
23
23
|
createChatCompletionStream: (client: HfInference, payload, instance) => {
|
24
|
+
const { max_tokens = 4096} = payload;
|
24
25
|
const hfRes = client.chatCompletionStream({
|
25
26
|
endpointUrl: instance.baseURL,
|
27
|
+
max_tokens: max_tokens,
|
26
28
|
messages: payload.messages,
|
27
29
|
model: payload.model,
|
28
30
|
stream: true,
|