@lobehub/chat 1.19.25 → 1.19.27

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/docker-compose/local/.env.example +17 -15
  5. package/docker-compose/local/.env.zh-CN.example +19 -16
  6. package/docker-compose/local/docker-compose.yml +17 -16
  7. package/docker-compose/local/init_data.json.tar.gz +0 -0
  8. package/docker-compose/local/s3_data.tar.gz +0 -0
  9. package/docker-compose/local/setup.sh +242 -0
  10. package/docker-compose/local-logto/.env.example +33 -0
  11. package/docker-compose/local-logto/.env.zh-CN.example +33 -0
  12. package/docker-compose/local-logto/docker-compose.yml +102 -0
  13. package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +5 -6
  14. package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +4 -5
  15. package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +4 -4
  16. package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +4 -4
  17. package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +4 -4
  18. package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +4 -4
  19. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +4 -4
  20. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +1 -1
  21. package/docs/self-hosting/advanced/auth/next-auth/github.mdx +3 -3
  22. package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +3 -3
  23. package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +4 -4
  24. package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +4 -4
  25. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +4 -4
  26. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +4 -4
  27. package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +5 -5
  28. package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +5 -5
  29. package/docs/self-hosting/server-database/docker-compose.mdx +2 -2
  30. package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +2 -2
  31. package/locales/ar/chat.json +2 -2
  32. package/locales/bg-BG/chat.json +2 -2
  33. package/locales/de-DE/chat.json +2 -2
  34. package/locales/en-US/chat.json +2 -2
  35. package/locales/es-ES/chat.json +2 -2
  36. package/locales/fr-FR/chat.json +2 -2
  37. package/locales/it-IT/chat.json +2 -2
  38. package/locales/ja-JP/chat.json +2 -2
  39. package/locales/ko-KR/chat.json +2 -2
  40. package/locales/nl-NL/chat.json +2 -2
  41. package/locales/pl-PL/chat.json +2 -2
  42. package/locales/pt-BR/chat.json +2 -2
  43. package/locales/ru-RU/chat.json +2 -2
  44. package/locales/tr-TR/chat.json +2 -2
  45. package/locales/vi-VN/chat.json +2 -2
  46. package/locales/zh-CN/chat.json +2 -2
  47. package/locales/zh-TW/chat.json +2 -2
  48. package/package.json +1 -1
  49. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -2
  50. package/src/components/GalleyGrid/index.tsx +11 -8
  51. package/src/config/modelProviders/ai360.ts +2 -1
  52. package/src/layout/GlobalProvider/StoreInitialization.tsx +12 -8
  53. package/src/libs/agent-runtime/ai360/index.ts +8 -0
  54. package/src/locales/default/chat.ts +2 -2
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "Olá, eu sou **{{name}}**, você pode começar a conversar comigo agora ou ir para [Configurações do Assistente]({{url}}) para completar minhas informações.",
6
6
  "agentDefaultMessageWithSystemRole": "Olá, eu sou **{{name}}**, {{systemRole}}, vamos conversar!",
7
7
  "agentDefaultMessageWithoutEdit": "Olá, sou o **{{name}}**, vamos começar a conversa!",
8
- "agentsAndConversations": "Agentes e Conversas",
8
+ "agents": "Assistente",
9
9
  "artifact": {
10
10
  "generating": "Gerando",
11
11
  "thinking": "Pensando",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "Regenerar",
83
83
  "roleAndArchive": "Função e Arquivo",
84
- "searchAgentPlaceholder": "Pesquisar assistentes e conversas...",
84
+ "searchAgentPlaceholder": "Assistente de busca...",
85
85
  "sendPlaceholder": "Digite a mensagem...",
86
86
  "sessionGroup": {
87
87
  "config": "Gerenciar grupos",
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "Здравствуйте, я **{{name}}**. Вы можете сразу начать со мной разговор или перейти в [настройки помощника]({{url}}), чтобы дополнить мою информацию.",
6
6
  "agentDefaultMessageWithSystemRole": "Привет, я **{{name}}**, {{systemRole}}. Давай начнем разговор!",
7
7
  "agentDefaultMessageWithoutEdit": "Привет, я **{{name}}**, давай начнём разговор!",
8
- "agentsAndConversations": "Агенты и беседы",
8
+ "agents": "Ассистент",
9
9
  "artifact": {
10
10
  "generating": "Генерация",
11
11
  "thinking": "В процессе размышлений",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "Сгенерировать заново",
83
83
  "roleAndArchive": "Роль и архив",
84
- "searchAgentPlaceholder": "Поиск помощников и разговоров...",
84
+ "searchAgentPlaceholder": "Поиск помощника...",
85
85
  "sendPlaceholder": "Введите сообщение...",
86
86
  "sessionGroup": {
87
87
  "config": "Управление группами",
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "Merhaba, ben **{{name}}**. Hemen benimle konuşmaya başlayabilir veya [Asistan Ayarları]({{url}}) sayfasına giderek bilgilerimi güncelleyebilirsin.",
6
6
  "agentDefaultMessageWithSystemRole": "Merhaba, Ben **{{name}}**, {{systemRole}}. Hemen sohbet etmeye başlayalım!",
7
7
  "agentDefaultMessageWithoutEdit": "Merhaba, ben **{{name}}**. Konuşmaya başlayalım!",
8
- "agentsAndConversations": "Ajanlar ve Konuşmalar",
8
+ "agents": "Asistan",
9
9
  "artifact": {
10
10
  "generating": "Üretiliyor",
11
11
  "thinking": "Düşünülüyor",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "Tekrarla",
83
83
  "roleAndArchive": "Rol ve Arşiv",
84
- "searchAgentPlaceholder": "Arama yardımcıları ve konuşmalar...",
84
+ "searchAgentPlaceholder": "Arama Asistanı...",
85
85
  "sendPlaceholder": "Mesajınızı buraya yazın...",
86
86
  "sessionGroup": {
87
87
  "config": "Grup Yönetimi",
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "Xin chào, tôi là **{{name}}**, bạn có thể bắt đầu trò chuyện với tôi ngay bây giờ, hoặc bạn có thể đến [Cài đặt trợ lý]({{url}}) để hoàn thiện thông tin của tôi.",
6
6
  "agentDefaultMessageWithSystemRole": "Xin chào, tôi là **{{name}}**, {{systemRole}}. Hãy bắt đầu trò chuyện ngay!",
7
7
  "agentDefaultMessageWithoutEdit": "Xin chào, tôi là **{{name}}**, chúng ta hãy bắt đầu trò chuyện nào!",
8
- "agentsAndConversations": "Người hỗ trợ và cuộc trò chuyện",
8
+ "agents": "Trợ ",
9
9
  "artifact": {
10
10
  "generating": "Đang tạo",
11
11
  "thinking": "Đang suy nghĩ",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "Tạo lại",
83
83
  "roleAndArchive": "Vai trò và lưu trữ",
84
- "searchAgentPlaceholder": "Tìm kiếm trợ cuộc trò chuyện...",
84
+ "searchAgentPlaceholder": "Trợtìm kiếm...",
85
85
  "sendPlaceholder": "Nhập nội dung trò chuyện...",
86
86
  "sessionGroup": {
87
87
  "config": "Quản lý nhóm",
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置]({{url}}) 完善我的信息。",
6
6
  "agentDefaultMessageWithSystemRole": "你好,我是 **{{name}}**,{{systemRole}},让我们开始对话吧!",
7
7
  "agentDefaultMessageWithoutEdit": "你好,我是 **{{name}}**,让我们开始对话吧!",
8
- "agentsAndConversations": "助手与会话",
8
+ "agents": "助手",
9
9
  "artifact": {
10
10
  "generating": "生成中",
11
11
  "thinking": "思考中",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "重新生成",
83
83
  "roleAndArchive": "角色与记录",
84
- "searchAgentPlaceholder": "搜索助手和对话...",
84
+ "searchAgentPlaceholder": "搜索助手...",
85
85
  "sendPlaceholder": "输入聊天内容...",
86
86
  "sessionGroup": {
87
87
  "config": "分组管理",
@@ -5,7 +5,7 @@
5
5
  "agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即與我開始對話,也可以前往 [助手設定]({{url}}) 完善我的資訊。",
6
6
  "agentDefaultMessageWithSystemRole": "你好,我是 **{{name}}**,{{systemRole}},讓我們開始對話吧!",
7
7
  "agentDefaultMessageWithoutEdit": "你好,我是 **{{name}}**,讓我們開始對話吧!",
8
- "agentsAndConversations": "助理與對話",
8
+ "agents": "助手",
9
9
  "artifact": {
10
10
  "generating": "生成中",
11
11
  "thinking": "思考中",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "regenerate": "重新生成",
83
83
  "roleAndArchive": "角色與記錄",
84
- "searchAgentPlaceholder": "搜索助手和對話...",
84
+ "searchAgentPlaceholder": "搜尋助手...",
85
85
  "sendPlaceholder": "輸入聊天內容...",
86
86
  "sessionGroup": {
87
87
  "config": "分組管理",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.19.25",
3
+ "version": "1.19.27",
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",
@@ -51,7 +51,7 @@ const Main = memo(() => {
51
51
  <Flexbox align={'center'} gap={4} horizontal>
52
52
  {
53
53
  <ActionIcon
54
- aria-label={t('agentsAndConversations')}
54
+ aria-label={t('agents')}
55
55
  icon={showSessionPanel ? PanelLeftClose : PanelLeftOpen}
56
56
  onClick={() => {
57
57
  updateSystemStatus({
@@ -60,7 +60,7 @@ const Main = memo(() => {
60
60
  });
61
61
  }}
62
62
  size={DESKTOP_HEADER_ICON_SIZE}
63
- title={t('agentsAndConversations')}
63
+ title={t('agents')}
64
64
  />
65
65
  }
66
66
  <Avatar
@@ -21,7 +21,7 @@ const GalleyGrid = memo<GalleyGridProps>(({ items, renderItem: Render }) => {
21
21
  };
22
22
  }
23
23
 
24
- const firstCol = items.length % 3 === 0 ? 3 : items.length % 3;
24
+ const firstCol = items.length > 4 ? 3 : items.length;
25
25
 
26
26
  return {
27
27
  firstRow: items.slice(0, firstCol),
@@ -29,13 +29,16 @@ const GalleyGrid = memo<GalleyGridProps>(({ items, renderItem: Render }) => {
29
29
  };
30
30
  }, [items]);
31
31
 
32
- const { gap, max } = useMemo(
33
- () => ({
32
+ const { gap, max } = useMemo(() => {
33
+ let scale = firstRow.length * (firstRow.length / items.length);
34
+
35
+ scale = scale < 1 ? 1 : scale;
36
+
37
+ return {
34
38
  gap: mobile ? 4 : 6,
35
- max: (mobile ? MAX_SIZE_MOBILE : MAX_SIZE_DESKTOP) * firstRow.length,
36
- }),
37
- [mobile],
38
- );
39
+ max: (mobile ? MAX_SIZE_MOBILE : MAX_SIZE_DESKTOP) * scale,
40
+ };
41
+ }, [mobile, items]);
39
42
 
40
43
  return (
41
44
  <Flexbox gap={gap}>
@@ -45,7 +48,7 @@ const GalleyGrid = memo<GalleyGridProps>(({ items, renderItem: Render }) => {
45
48
  ))}
46
49
  </Grid>
47
50
  {lastRow.length > 0 && (
48
- <Grid col={lastRow.length > 2 ? 3 : lastRow.length} gap={gap} max={max}>
51
+ <Grid col={firstRow.length} gap={gap} max={max}>
49
52
  {lastRow.map((i, index) => (
50
53
  <Render {...i} index={index} key={index} />
51
54
  ))}
@@ -8,7 +8,6 @@ const Ai360: ModelProviderCard = {
8
8
  '360GPT2 Pro 是 360 公司推出的高级自然语言处理模型,具备卓越的文本生成和理解能力,尤其在生成与创作领域表现出色,能够处理复杂的语言转换和角色演绎任务。',
9
9
  displayName: '360GPT2 Pro',
10
10
  enabled: true,
11
- functionCall: false,
12
11
  id: '360gpt2-pro',
13
12
  maxOutput: 7000,
14
13
  pricing: {
@@ -22,6 +21,8 @@ const Ai360: ModelProviderCard = {
22
21
  description:
23
22
  '360GPT Pro 作为 360 AI 模型系列的重要成员,以高效的文本处理能力满足多样化的自然语言应用场景,支持长文本理解和多轮对话等功能。',
24
23
  displayName: '360GPT Pro',
24
+ enabled: true,
25
+ functionCall: true,
25
26
  id: '360gpt-pro',
26
27
  maxOutput: 7000,
27
28
  pricing: {
@@ -20,12 +20,14 @@ const StoreInitialization = memo(() => {
20
20
  useTranslation('error');
21
21
 
22
22
  const router = useRouter();
23
- const [isLogin, isSignedIn, useInitUserState, importUrlShareSettings] = useUserStore((s) => [
24
- authSelectors.isLogin(s),
25
- s.isSignedIn,
26
- s.useInitUserState,
27
- s.importUrlShareSettings,
28
- ]);
23
+ const [isLogin, isSignedIn, useInitUserState, importUrlShareSettings, isUserStateInit] =
24
+ useUserStore((s) => [
25
+ authSelectors.isLogin(s),
26
+ s.isSignedIn,
27
+ s.useInitUserState,
28
+ s.importUrlShareSettings,
29
+ s.isUserStateInit,
30
+ ]);
29
31
 
30
32
  const { serverConfig } = useServerConfigStore();
31
33
 
@@ -74,8 +76,10 @@ const StoreInitialization = memo(() => {
74
76
  // Import settings from the url
75
77
  const searchParam = useSearchParams().get(LOBE_URL_IMPORT_NAME);
76
78
  useEffect(() => {
77
- importUrlShareSettings(searchParam);
78
- }, [searchParam]);
79
+ // Why use `usUserStateInit`,
80
+ // see: https://github.com/lobehub/lobe-chat/pull/4072
81
+ if (searchParam && isUserStateInit) importUrlShareSettings(searchParam);
82
+ }, [searchParam, isUserStateInit]);
79
83
 
80
84
  useEffect(() => {
81
85
  if (mobile) {
@@ -3,6 +3,14 @@ import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
3
3
 
4
4
  export const LobeAi360AI = LobeOpenAICompatibleFactory({
5
5
  baseURL: 'https://ai.360.cn/v1',
6
+ chatCompletion: {
7
+ handlePayload: (payload) => {
8
+ return {
9
+ ...payload,
10
+ stream: !payload.tools,
11
+ } as any;
12
+ },
13
+ },
6
14
  debug: {
7
15
  chatCompletion: () => process.env.DEBUG_AI360_CHAT_COMPLETION === '1',
8
16
  },
@@ -6,7 +6,7 @@ export default {
6
6
  '你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置]({{url}}) 完善我的信息。',
7
7
  agentDefaultMessageWithSystemRole: '你好,我是 **{{name}}**,{{systemRole}},让我们开始对话吧!',
8
8
  agentDefaultMessageWithoutEdit: '你好,我是 **{{name}}**,让我们开始对话吧!',
9
- agentsAndConversations: '助手与会话',
9
+ agents: '助手',
10
10
  artifact: {
11
11
  generating: '生成中',
12
12
  thinking: '思考中',
@@ -83,7 +83,7 @@ export default {
83
83
  },
84
84
  regenerate: '重新生成',
85
85
  roleAndArchive: '角色与记录',
86
- searchAgentPlaceholder: '搜索助手和对话...',
86
+ searchAgentPlaceholder: '搜索助手...',
87
87
  sendPlaceholder: '输入聊天内容...',
88
88
  sessionGroup: {
89
89
  config: '分组管理',