@lobehub/chat 0.154.4 → 0.154.6
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 +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/self-hosting/environment-variables/auth.mdx +8 -8
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +11 -11
- package/package.json +1 -1
- package/src/app/(main)/settings/_layout/Mobile/Header.tsx +4 -2
- package/src/app/(main)/settings/hooks/useCategory.tsx +12 -3
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +17 -3
- package/src/config/modelProviders/google.ts +8 -0
- package/src/features/ChatInput/ActionBar/ModelSwitch.tsx +2 -2
- package/src/features/User/UserPanel/useMenu.tsx +16 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.154.6](https://github.com/lobehub/lobe-chat/compare/v0.154.5...v0.154.6)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-05-07**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Add gemini-1.0-pro-002.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Add gemini-1.0-pro-002, closes [#2406](https://github.com/lobehub/lobe-chat/issues/2406) ([44b29a9](https://github.com/lobehub/lobe-chat/commit/44b29a9))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.154.5](https://github.com/lobehub/lobe-chat/compare/v0.154.4...v0.154.5)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-05-06**</sup>
|
|
33
|
+
|
|
34
|
+
#### 💄 Styles
|
|
35
|
+
|
|
36
|
+
- **misc**: Update LLM Settings Form styles.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Styles
|
|
44
|
+
|
|
45
|
+
- **misc**: Update LLM Settings Form styles, closes [#2393](https://github.com/lobehub/lobe-chat/issues/2393) ([4f98e6c](https://github.com/lobehub/lobe-chat/commit/4f98e6c))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.154.4](https://github.com/lobehub/lobe-chat/compare/v0.154.3...v0.154.4)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-05-06**</sup>
|
package/README.md
CHANGED
|
@@ -261,14 +261,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
261
261
|
|
|
262
262
|
<!-- AGENT LIST -->
|
|
263
263
|
|
|
264
|
-
| Recent Submits
|
|
265
|
-
|
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
268
|
-
| [
|
|
269
|
-
| [
|
|
270
|
-
|
|
271
|
-
> 📊 Total agents: [<kbd>**
|
|
264
|
+
| Recent Submits | Description |
|
|
265
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
266
|
+
| [Video to Blog Post Assistant](https://chat-preview.lobehub.com/market?agent=video-2-blog-assistant)<br/><sup>By **[yayoinoyume](https://github.com/yayoinoyume)** on **2024-05-06**</sup> | Helps you quickly organize messy subtitles into beautiful blog posts<br/>`subtitle-organization` `blog-post-formatting` `video-to-blog` |
|
|
267
|
+
| [Art Evaluation Tutor](https://chat-preview.lobehub.com/market?agent=wanwusheng-art)<br/><sup>By **[dingyufei615](https://github.com/dingyufei615)** on **2024-05-06**</sup> | Specializes in teaching children's art, meticulously evaluates works, pays attention to details, and adapts to students of different age groups.<br/>`art-education` `evaluation` `creativity` `teaching` `painting` |
|
|
268
|
+
| [iOS Code Artist](https://chat-preview.lobehub.com/market?agent=ios-develop)<br/><sup>By **[Alcu1n](https://github.com/Alcu1n)** on **2024-05-03**</sup> | iOS development expert with 15 years of experience, proficient in Swift, SwiftUI, Flutter. Clear logic in code, precise debugging, providing project frameworks from 0 to 1.<br/>`i-os-development` `coding` `debugging` `project-planning` `logical-thinking` |
|
|
269
|
+
| [Sales Description Specialist](https://chat-preview.lobehub.com/market?agent=verkauf-kleinanzeigen)<br/><sup>By **[highseen](https://github.com/highseen)** on **2024-04-30**</sup> | Assists in the sale of used items through research, pricing, description, and title creation.<br/>`product-sales` `research` `description` |
|
|
270
|
+
|
|
271
|
+
> 📊 Total agents: [<kbd>**247**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
272
272
|
|
|
273
273
|
<!-- AGENT LIST -->
|
|
274
274
|
|
package/README.zh-CN.md
CHANGED
|
@@ -249,14 +249,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
249
249
|
|
|
250
250
|
<!-- AGENT LIST -->
|
|
251
251
|
|
|
252
|
-
| 最近新增
|
|
253
|
-
|
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
| [
|
|
257
|
-
| [
|
|
258
|
-
|
|
259
|
-
> 📊 Total agents: [<kbd>**
|
|
252
|
+
| 最近新增 | 助手说明 |
|
|
253
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
254
|
+
| [视频转博客文章助手](https://chat-preview.lobehub.com/market?agent=video-2-blog-assistant)<br/><sup>By **[yayoinoyume](https://github.com/yayoinoyume)** on **2024-05-06**</sup> | 帮你快速整理缭乱的字幕,变成精美的博客文章<br/>`字幕整理` `博文格式` `视频变博客` |
|
|
255
|
+
| [美术评价导师](https://chat-preview.lobehub.com/market?agent=wanwusheng-art)<br/><sup>By **[dingyufei615](https://github.com/dingyufei615)** on **2024-05-06**</sup> | 擅长少儿美术教学,细致评价作品,关注细节,适应不同年龄段学生。<br/>`美术教育` `评价` `创意` `教学` `绘画` |
|
|
256
|
+
| [iOS 代码艺术家](https://chat-preview.lobehub.com/market?agent=ios-develop)<br/><sup>By **[Alcu1n](https://github.com/Alcu1n)** on **2024-05-03**</sup> | iOS 开发专家,15 年经验,精通 Swift、SwiftUI、Flutter。逻辑清晰的代码,精准 debug,提供 0 到 1 的项目框架。<br/>`i-os开发` `编码` `调试` `项目规划` `逻辑思维` |
|
|
257
|
+
| [销售描述专家](https://chat-preview.lobehub.com/market?agent=verkauf-kleinanzeigen)<br/><sup>By **[highseen](https://github.com/highseen)** on **2024-04-30**</sup> | 通过研究、定价、描述和标题设计帮助销售二手物品。<br/>`产品销售` `研究` `描述` |
|
|
258
|
+
|
|
259
|
+
> 📊 Total agents: [<kbd>**247**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
260
260
|
|
|
261
261
|
<!-- AGENT LIST -->
|
|
262
262
|
|
|
@@ -19,20 +19,13 @@ LobeChat provides a complete authentication service capability when deployed. Th
|
|
|
19
19
|
|
|
20
20
|
### General Settings
|
|
21
21
|
|
|
22
|
-
#### `
|
|
22
|
+
#### `NEXT_AUTH_SECRET`
|
|
23
23
|
|
|
24
24
|
- Type: Required
|
|
25
25
|
- Description: Key used to encrypt the session tokens in Auth.js. You can generate the key using the following command: `openssl rand -base64 32`.
|
|
26
26
|
- Default: `-`
|
|
27
27
|
- Example: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=`
|
|
28
28
|
|
|
29
|
-
#### `NEXTAUTH_URL`
|
|
30
|
-
|
|
31
|
-
- Type: Optional
|
|
32
|
-
- Description: This URL is used to specify the callback address for Auth.js during OAuth authentication. It does not need to be set when deploying on Vercel.
|
|
33
|
-
- Default: `-`
|
|
34
|
-
- Example: `https://example.com/api/auth`
|
|
35
|
-
|
|
36
29
|
#### `NEXT_AUTH_SSO_PROVIDERS`
|
|
37
30
|
|
|
38
31
|
- Type: Optional
|
|
@@ -40,6 +33,13 @@ LobeChat provides a complete authentication service capability when deployed. Th
|
|
|
40
33
|
- Default: `auth0`
|
|
41
34
|
- Example: `auth0,azure-ad,authentik`
|
|
42
35
|
|
|
36
|
+
#### `NEXTAUTH_URL`
|
|
37
|
+
|
|
38
|
+
- Type: Optional
|
|
39
|
+
- Description: This URL is used to specify the callback address for Auth.js during OAuth authentication. It does not need to be set when deploying on Vercel.
|
|
40
|
+
- Default: `-`
|
|
41
|
+
- Example: `https://example.com/api/auth`
|
|
42
|
+
|
|
43
43
|
### Auth0
|
|
44
44
|
|
|
45
45
|
#### `AUTH0_CLIENT_ID`
|
|
@@ -17,20 +17,13 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相
|
|
|
17
17
|
|
|
18
18
|
### 通用设置
|
|
19
19
|
|
|
20
|
-
#### `
|
|
20
|
+
#### `NEXT_AUTH_SECRET`
|
|
21
21
|
|
|
22
22
|
- 类型:必选
|
|
23
23
|
- 描述:用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32`.
|
|
24
24
|
- 默认值: `-`
|
|
25
25
|
- 示例: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=`
|
|
26
26
|
|
|
27
|
-
#### `NEXTAUTH_URL`
|
|
28
|
-
|
|
29
|
-
- 类型:可选
|
|
30
|
-
- 描述:该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,在 Vercel 上部署时无需设置。
|
|
31
|
-
- 默认值:`-`
|
|
32
|
-
- 示例:`https://example.com/api/auth`
|
|
33
|
-
|
|
34
27
|
#### `NEXT_AUTH_SSO_PROVIDERS`
|
|
35
28
|
|
|
36
29
|
- 类型:可选
|
|
@@ -38,6 +31,13 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相
|
|
|
38
31
|
- 默认值: `auth0`
|
|
39
32
|
- 示例: `auth0,azure-ad,authentik`
|
|
40
33
|
|
|
34
|
+
#### `NEXTAUTH_URL`
|
|
35
|
+
|
|
36
|
+
- 类型:可选
|
|
37
|
+
- 描述:该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,在 Vercel 上部署时无需设置。
|
|
38
|
+
- 默认值:`-`
|
|
39
|
+
- 示例:`https://example.com/api/auth`
|
|
40
|
+
|
|
41
41
|
### Auth0
|
|
42
42
|
|
|
43
43
|
#### `AUTH0_CLIENT_ID`
|
|
@@ -65,21 +65,21 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相
|
|
|
65
65
|
|
|
66
66
|
#### `AZURE_AD_CLIENT_ID`
|
|
67
67
|
|
|
68
|
-
-
|
|
68
|
+
- 类型:必选
|
|
69
69
|
- 描述:Microsoft Entra ID 应用程序的客户端 ID。
|
|
70
70
|
- 默认值:`-`
|
|
71
71
|
- 示例:`be8f6da1-58c3-4f16-ff1b-78f5148e10df`
|
|
72
72
|
|
|
73
73
|
#### `AZURE_AD_CLIENT_SECRET`
|
|
74
74
|
|
|
75
|
-
-
|
|
75
|
+
- 类型:必选
|
|
76
76
|
- 描述:Microsoft Entra ID 应用程序的客户端密钥。
|
|
77
77
|
- 默认值:`-`
|
|
78
78
|
- 示例:`~gI8Q.pTiN1vwB6Gl.E1yFT1ojcXABkdACfJXaNj`
|
|
79
79
|
|
|
80
80
|
#### `AZURE_AD_TENANT_ID`
|
|
81
81
|
|
|
82
|
-
-
|
|
82
|
+
- 类型:必选
|
|
83
83
|
- 描述:Microsoft Entra ID 应用程序的租户 ID。
|
|
84
84
|
- 默认值:`-`
|
|
85
85
|
- 示例:`c8ae2f36-edf6-4cda-96b9-d3e198a47cba`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.154.
|
|
3
|
+
"version": "0.154.6",
|
|
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",
|
|
@@ -21,10 +21,12 @@ const Header = memo(() => {
|
|
|
21
21
|
center={
|
|
22
22
|
<MobileNavBarTitle
|
|
23
23
|
title={
|
|
24
|
-
<Flexbox align={'center'} gap={
|
|
24
|
+
<Flexbox align={'center'} gap={8} horizontal>
|
|
25
25
|
<span style={{ lineHeight: 1.2 }}> {t(`tab.${activeSettingsKey}`)}</span>
|
|
26
26
|
{activeSettingsKey === SettingsTabs.Sync && (
|
|
27
|
-
<Tag
|
|
27
|
+
<Tag bordered={false} color={'warning'}>
|
|
28
|
+
{t('tab.experiment')}
|
|
29
|
+
</Tag>
|
|
28
30
|
)}
|
|
29
31
|
</Flexbox>
|
|
30
32
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Icon } from '@lobehub/ui';
|
|
2
|
-
import {
|
|
2
|
+
import { Tag } from 'antd';
|
|
3
|
+
import { Bot, Brain, Cloudy, Info, Mic2, Settings2 } from 'lucide-react';
|
|
3
4
|
import { useMemo } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
5
7
|
|
|
6
8
|
import type { MenuProps } from '@/components/Menu';
|
|
7
9
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
@@ -28,10 +30,17 @@ export const useCategory = ({ mobile }: UseCategoryOptions = {}) => {
|
|
|
28
30
|
enableWebrtc && {
|
|
29
31
|
icon: <Icon icon={Cloudy} size={iconSize} />,
|
|
30
32
|
key: SettingsTabs.Sync,
|
|
31
|
-
label:
|
|
33
|
+
label: (
|
|
34
|
+
<Flexbox align={'center'} gap={8} horizontal>
|
|
35
|
+
{t('tab.sync')}
|
|
36
|
+
<Tag bordered={false} color={'warning'}>
|
|
37
|
+
{t('tab.experiment')}
|
|
38
|
+
</Tag>
|
|
39
|
+
</Flexbox>
|
|
40
|
+
),
|
|
32
41
|
},
|
|
33
42
|
showLLM && {
|
|
34
|
-
icon: <Icon icon={
|
|
43
|
+
icon: <Icon icon={Brain} size={iconSize} />,
|
|
35
44
|
key: SettingsTabs.LLM,
|
|
36
45
|
label: t('tab.llm'),
|
|
37
46
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Form, type FormItemProps, type ItemGroup } from '@lobehub/ui';
|
|
4
4
|
import { Input, Switch } from 'antd';
|
|
5
|
-
import { createStyles
|
|
5
|
+
import { createStyles } from 'antd-style';
|
|
6
6
|
import { debounce } from 'lodash-es';
|
|
7
7
|
import { ReactNode, memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
@@ -23,7 +23,21 @@ import { GlobalLLMProviderKey } from '@/types/settings';
|
|
|
23
23
|
import Checker from '../Checker';
|
|
24
24
|
import ProviderModelListSelect from '../ProviderModelList';
|
|
25
25
|
|
|
26
|
-
const useStyles = createStyles(() => ({
|
|
26
|
+
const useStyles = createStyles(({ css, prefixCls, responsive }) => ({
|
|
27
|
+
form: css`
|
|
28
|
+
.${prefixCls}-form-item-control:has(.${prefixCls}-input,.${prefixCls}-select) {
|
|
29
|
+
flex: none;
|
|
30
|
+
width: min(70%, 800px);
|
|
31
|
+
min-width: min(70%, 800px) !important;
|
|
32
|
+
}
|
|
33
|
+
${responsive.mobile} {
|
|
34
|
+
width: 100%;
|
|
35
|
+
min-width: unset !important;
|
|
36
|
+
}
|
|
37
|
+
.${prefixCls}-select-selection-overflow-item {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
}
|
|
40
|
+
`,
|
|
27
41
|
safariIconWidthFix: css`
|
|
28
42
|
svg {
|
|
29
43
|
width: unset !important;
|
|
@@ -173,11 +187,11 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
|
173
187
|
|
|
174
188
|
return (
|
|
175
189
|
<Form
|
|
190
|
+
className={styles.form}
|
|
176
191
|
form={form}
|
|
177
192
|
items={[model]}
|
|
178
193
|
onValuesChange={debounce(setSettings, 100)}
|
|
179
194
|
{...FORM_STYLE}
|
|
180
|
-
itemMinWidth={'max(50%,400px)'}
|
|
181
195
|
/>
|
|
182
196
|
);
|
|
183
197
|
},
|
|
@@ -51,6 +51,14 @@ const Google: ModelProviderCard = {
|
|
|
51
51
|
maxOutput: 2048,
|
|
52
52
|
tokens: 30_720 + 2048,
|
|
53
53
|
},
|
|
54
|
+
{
|
|
55
|
+
description:
|
|
56
|
+
'The best model for scaling across a wide range of tasks. Released April 9, 2024.',
|
|
57
|
+
displayName: 'Gemini 1.0 Pro 002 (Tuning)',
|
|
58
|
+
id: 'gemini-1.0-pro-002',
|
|
59
|
+
maxOutput: 2048,
|
|
60
|
+
tokens: 30_720 + 2048,
|
|
61
|
+
},
|
|
54
62
|
{
|
|
55
63
|
description:
|
|
56
64
|
'The best model for scaling across a wide range of tasks. This is the latest model.',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionIcon } from '@lobehub/ui';
|
|
2
|
-
import {
|
|
2
|
+
import { Brain } from 'lucide-react';
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ const ModelSwitch = memo(() => {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<ModelSwitchPanel>
|
|
13
|
-
<ActionIcon icon={
|
|
13
|
+
<ActionIcon icon={Brain} placement={'bottom'} title={t('ModelSwitch.title')} />
|
|
14
14
|
</ModelSwitchPanel>
|
|
15
15
|
);
|
|
16
16
|
});
|
|
@@ -31,11 +31,20 @@ import { authSelectors } from '@/store/user/selectors';
|
|
|
31
31
|
import { useNewVersion } from './useNewVersion';
|
|
32
32
|
|
|
33
33
|
const NewVersionBadge = memo(
|
|
34
|
-
({
|
|
34
|
+
({
|
|
35
|
+
children,
|
|
36
|
+
showBadge,
|
|
37
|
+
onClick,
|
|
38
|
+
}: PropsWithChildren & { onClick: () => void; showBadge?: boolean }) => {
|
|
35
39
|
const { t } = useTranslation('common');
|
|
36
|
-
if (!showBadge)
|
|
40
|
+
if (!showBadge)
|
|
41
|
+
return (
|
|
42
|
+
<Flexbox flex={1} onClick={onClick}>
|
|
43
|
+
{children}
|
|
44
|
+
</Flexbox>
|
|
45
|
+
);
|
|
37
46
|
return (
|
|
38
|
-
<Flexbox align={'center'}
|
|
47
|
+
<Flexbox align={'center'} flex={1} gap={8} horizontal onClick={onClick} width={'100%'}>
|
|
39
48
|
<span>{children}</span>
|
|
40
49
|
<Badge count={t('upgradeVersion.hasNew')} />
|
|
41
50
|
</Flexbox>
|
|
@@ -55,10 +64,10 @@ export const useMenu = () => {
|
|
|
55
64
|
icon: <Icon icon={Settings2} />,
|
|
56
65
|
key: 'setting',
|
|
57
66
|
label: (
|
|
58
|
-
<Flexbox align={'center'} horizontal>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
</
|
|
67
|
+
<Flexbox align={'center'} gap={8} horizontal>
|
|
68
|
+
<NewVersionBadge onClick={openSettings} showBadge={hasNewVersion}>
|
|
69
|
+
{t('userPanel.setting')}
|
|
70
|
+
</NewVersionBadge>
|
|
62
71
|
<ActionIcon
|
|
63
72
|
icon={Maximize}
|
|
64
73
|
onClick={() => router.push(urlJoin('/settings', SettingsTabs.Common))}
|