@lobehub/chat 0.148.1 → 0.148.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.148.3](https://github.com/lobehub/lobe-chat/compare/v0.148.2...v0.148.3)
6
+
7
+ <sup>Released on **2024-04-21**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **ollama**: Show size info while download, support cancel donwload, optimize calculation for speed.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **ollama**: Show size info while download, support cancel donwload, optimize calculation for speed, closes [#1664](https://github.com/lobehub/lobe-chat/issues/1664) ([9b18f47](https://github.com/lobehub/lobe-chat/commit/9b18f47))
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 0.148.2](https://github.com/lobehub/lobe-chat/compare/v0.148.1...v0.148.2)
31
+
32
+ <sup>Released on **2024-04-21**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Add LLaMA 3 in groq + Mixtral 8x22B model.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Add LLaMA 3 in groq + Mixtral 8x22B model, closes [#2128](https://github.com/lobehub/lobe-chat/issues/2128) ([6144448](https://github.com/lobehub/lobe-chat/commit/6144448))
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 0.148.1](https://github.com/lobehub/lobe-chat/compare/v0.148.0...v0.148.1)
6
56
 
7
57
  <sup>Released on **2024-04-20**</sup>
@@ -24,7 +24,7 @@ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your
24
24
 
25
25
  ### Click the button below to deploy
26
26
 
27
- [![][deploy-button-image]][deploy-link]
27
+ [![](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat)
28
28
 
29
29
  Simply log in with your GitHub account, and remember to fill in `OPENAI_API_KEY` (required) and `ACCESS_CODE` (recommended) in the environment variables page.
30
30
 
@@ -41,9 +41,6 @@ Vercel's assigned domain DNS may be polluted in some regions, so binding a custo
41
41
  If you have deployed your project using the one-click deployment steps mentioned above, you may find that you are always prompted with "updates available." This is because Vercel creates a new project for you by default instead of forking this project, which causes the inability to accurately detect updates.
42
42
 
43
43
  <Callout>
44
- We recommend following the [Self-Hosting Upstream Sync](/docs/self-hosting/upstream-sync) steps to
44
+ We recommend following the [Self-Hosting Upstream Sync](/docs/self-hosting/advanced/upstream-sync) steps to
45
45
  Redeploy.
46
46
  </Callout>
47
-
48
- [deploy-button-image]: https://vercel.com/button
49
- [deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
89
89
  "closeMessage": "إغلاق الرسالة",
90
90
  "confirm": "تأكيد وإعادة المحاولة",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "تحميل",
94
- "description": "أدخل علامة نموذج Ollama الخاصة بك لاستكمال الجلسة",
95
- "title": "تحميل نموذج Ollama المحدد"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "فتح المسؤول توثيق تسجيل الدخول الموحد، انقر فوق الزر أدناه لتسجيل الدخول وفتح التطبيق",
100
93
  "success": "تم تسجيل الدخول بنجاح",
101
94
  "title": "تسجيل الدخول إلى الحساب",
102
95
  "welcome": "مرحبا بك!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "إلغاء",
99
+ "confirm": "تأكيد",
100
+ "description": "أدخل علامة نموذج Ollama الخاصة بك لاستكمال الجلسة",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "بدء التحميل...",
103
+ "title": "تحميل نموذج Ollama المحدد"
104
+ },
104
105
  "password": {
105
106
  "description": "قام المسؤول بتشفير التطبيق، قم بإدخال كلمة مرور التطبيق لفتح التطبيق. يتعين إدخال كلمة المرور مرة واحدة فقط",
106
107
  "placeholder": "الرجاء إدخال كلمة المرور",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Добавете URL адрес на OpenAI прокси (по избор)",
89
89
  "closeMessage": "Затвори съобщението",
90
90
  "confirm": "Потвърди и опитай отново",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Изтегли",
94
- "description": "Въведете етикета на вашия модел Ollama, за да продължите с разговора",
95
- "title": "Изтеглете посочения модел Ollama"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Администраторът е активирал унифицирано удостоверяване за вход. Щракнете върху бутона по-долу, за да влезете и отключите приложението.",
100
93
  "success": "Входът е успешен",
101
94
  "title": "Влезте в акаунта си",
102
95
  "welcome": "Добре дошли!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Отказ",
99
+ "confirm": "Изтегли",
100
+ "description": "Въведете етикета на вашия модел Ollama, за да продължите разговора",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Започване на изтеглянето...",
103
+ "title": "Изтегляне на определения модел Ollama"
104
+ },
104
105
  "password": {
105
106
  "description": "Криптирането на приложението е активирано от администратора. Въведете паролата за приложението, за да отключите приложението. Паролата трябва да бъде попълнена само веднъж.",
106
107
  "placeholder": "Моля, въведете парола",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Fügen Sie die OpenAI-Proxy-URL hinzu (optional)",
89
89
  "closeMessage": "Hinweis schließen",
90
90
  "confirm": "Bestätigen und erneut versuchen",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Herunterladen",
94
- "description": "Geben Sie Ihre Ollama-Modellbezeichnung ein, um fortzufahren",
95
- "title": "Bestimmtes Ollama-Modell herunterladen"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Der Administrator hat die einheitliche Anmeldeauthentifizierung aktiviert. Klicken Sie unten auf die Schaltfläche, um sich anzumelden und die App zu entsperren.",
100
93
  "success": "Anmeldung erfolgreich",
101
94
  "title": "Anmelden",
102
95
  "welcome": "Willkommen!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Abbrechen",
99
+ "confirm": "Herunterladen",
100
+ "description": "Geben Sie Ihre Ollama-Modellkennung ein, um fortzufahren",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Download startet...",
103
+ "title": "Bestimmtes Ollama-Modell herunterladen"
104
+ },
104
105
  "password": {
105
106
  "description": "Der Administrator hat die App-Verschlüsselung aktiviert. Gib das App-Passwort ein, um die App zu entsperren. Das Passwort muss nur einmal eingegeben werden.",
106
107
  "placeholder": "Passwort eingeben",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Add OpenAI proxy URL (optional)",
89
89
  "closeMessage": "Close message",
90
90
  "confirm": "Confirm and Retry",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Download",
94
- "description": "Enter your Ollama model label to proceed with the conversation",
95
- "title": "Download specified Ollama model"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "The administrator has enabled unified login authentication. Click the button below to log in and unlock the application.",
100
93
  "success": "Login successful",
101
94
  "title": "Log in to your account",
102
95
  "welcome": "Welcome!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Cancel Download",
99
+ "confirm": "Download",
100
+ "description": "Enter your Ollama model tag to proceed with the conversation",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Starting download...",
103
+ "title": "Download Specific Ollama Model"
104
+ },
104
105
  "password": {
105
106
  "description": "The application encryption has been enabled by the administrator. Enter the application password to unlock the application. The password only needs to be filled in once.",
106
107
  "placeholder": "Please enter password",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Agregar URL de proxy de OpenAI (opcional)",
89
89
  "closeMessage": "Cerrar mensaje",
90
90
  "confirm": "Confirmar y volver a intentar",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Descargar",
94
- "description": "Ingresa las etiquetas de tu modelo Ollama para continuar la sesión",
95
- "title": "Descargar el modelo Ollama especificado"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "El administrador ha habilitado la autenticación de inicio de sesión única. Haz clic en el botón a continuación para iniciar sesión y desbloquear la aplicación.",
100
93
  "success": "Inicio de sesión exitoso",
101
94
  "title": "Iniciar sesión",
102
95
  "welcome": "¡Bienvenido!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Cancelar descarga",
99
+ "confirm": "Descargar",
100
+ "description": "Ingresa las etiquetas de tu modelo Ollama para continuar la sesión",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Iniciando descarga...",
103
+ "title": "Descargar modelo Ollama específico"
104
+ },
104
105
  "password": {
105
106
  "description": "El administrador ha activado el cifrado de la aplicación. Ingresa la contraseña de la aplicación para desbloquearla. La contraseña solo se necesita ingresar una vez",
106
107
  "placeholder": "Ingresa la contraseña",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Ajouter une adresse de proxy OpenAI (facultatif)",
89
89
  "closeMessage": "Fermer le message",
90
90
  "confirm": "Confirmer et réessayer",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Télécharger",
94
- "description": "Saisissez l'étiquette de votre modèle Ollama pour continuer la session",
95
- "title": "Télécharger le modèle Ollama spécifié"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "L'administrateur a activé l'authentification de connexion unique. Cliquez sur le bouton ci-dessous pour vous connecter et déverrouiller l'application.",
100
93
  "success": "Connexion réussie",
101
94
  "title": "Se connecter",
102
95
  "welcome": "Bienvenue !"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Annuler le téléchargement",
99
+ "confirm": "Télécharger",
100
+ "description": "Entrez vos balises de modèle Ollama pour continuer la session",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Début du téléchargement...",
103
+ "title": "Télécharger le modèle Ollama spécifié"
104
+ },
104
105
  "password": {
105
106
  "description": "L'administrateur a activé le cryptage de l'application. Entrez le mot de passe de l'application pour déverrouiller. Le mot de passe ne doit être saisi qu'une seule fois.",
106
107
  "placeholder": "Entrez le mot de passe",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Aggiungi URL del proxy OpenAI (opzionale)",
89
89
  "closeMessage": "Chiudi messaggio",
90
90
  "confirm": "Conferma e riprova",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Scarica",
94
- "description": "Inserisci l'etichetta del tuo modello Ollama per continuare la sessione",
95
- "title": "Scarica il modello Ollama specificato"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "L'amministratore ha abilitato l'autenticazione di accesso unificata. Fai clic sul pulsante sottostante per accedere e sbloccare l'applicazione.",
100
93
  "success": "Accesso riuscito",
101
94
  "title": "Accedi all'account",
102
95
  "welcome": "Benvenuto!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Annulla il download",
99
+ "confirm": "Scarica",
100
+ "description": "Inserisci l'etichetta del tuo modello Ollama per continuare la sessione",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Inizio download...",
103
+ "title": "Scarica il modello Ollama specificato"
104
+ },
104
105
  "password": {
105
106
  "description": "L'amministratore ha attivato la crittografia dell'applicazione. Inserisci la password dell'applicazione per sbloccarla. La password va inserita solo una volta.",
106
107
  "placeholder": "Inserisci la password",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "OpenAI 代理アドレスを追加する(オプション)",
89
89
  "closeMessage": "ヒントを閉じる",
90
90
  "confirm": "確認して再試行",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "ダウンロード",
94
- "description": "Ollamaモデルのラベルを入力して、会話を続行してください",
95
- "title": "指定のOllamaモデルをダウンロード"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "管理者が統一ログイン認証を有効にしました。下のボタンをクリックしてログインすると、アプリがロック解除されます。",
100
93
  "success": "ログインに成功しました",
101
94
  "title": "アカウントにログイン",
102
95
  "welcome": "ようこそ!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "キャンセル",
99
+ "confirm": "ダウンロード",
100
+ "description": "Ollamaモデルのタグを入力して、会話を続行してください",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "ダウンロードを開始しています...",
103
+ "title": "指定のOllamaモデルをダウンロード"
104
+ },
104
105
  "password": {
105
106
  "description": "管理者によってアプリが暗号化されました。アプリをロック解除するには、アプリのパスワードを入力してください。パスワードは1回だけ入力すればよいです",
106
107
  "placeholder": "パスワードを入力してください",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "OpenAI 프록시 주소 추가(선택 사항)",
89
89
  "closeMessage": "알림 닫기",
90
90
  "confirm": "확인 및 다시 시도",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "다운로드",
94
- "description": "Ollama 모델 태그를 입력하여 세션을 계속할 수 있습니다.",
95
- "title": "지정된 Ollama 모델 다운로드"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "관리자가 통합 로그인 인증을 활성화했습니다. 아래 버튼을 클릭하여 로그인하면 앱을 잠금 해제할 수 있습니다.",
100
93
  "success": "로그인 성공",
101
94
  "title": "계정 로그인",
102
95
  "welcome": "환영합니다!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "다운로드 취소",
99
+ "confirm": "다운로드",
100
+ "description": "Ollama 모델 태그를 입력하여 세션을 계속하세요.",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "다운로드 시작 중...",
103
+ "title": "지정된 Ollama 모델 다운로드"
104
+ },
104
105
  "password": {
105
106
  "description": "관리자가 애플리케이션 암호화를 활성화했습니다. 애플리케이션을 잠금 해제하려면 애플리케이션 비밀번호를 입력하십시오. 비밀번호는 한 번만 입력하면 됩니다.",
106
107
  "placeholder": "비밀번호를 입력하세요",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Voeg een optionele OpenAI-proxy-URL toe",
89
89
  "closeMessage": "Sluit bericht",
90
90
  "confirm": "Bevestigen en opnieuw proberen",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Downloaden",
94
- "description": "Voer je Ollama model tag in, voltooi om het gesprek voort te zetten",
95
- "title": "Download het gespecificeerde Ollama model"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "De beheerder heeft een uniforme aanmeldingsverificatie ingeschakeld. Klik op de onderstaande knop om in te loggen en de app te ontgrendelen.",
100
93
  "success": "Succesvol ingelogd",
101
94
  "title": "Account inloggen",
102
95
  "welcome": "Welkom!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Annuleren",
99
+ "confirm": "Bevestigen",
100
+ "description": "Voer uw Ollama-modeltag in om door te gaan met de sessie",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Downloaden begint...",
103
+ "title": "Specifiek Ollama-model downloaden"
104
+ },
104
105
  "password": {
105
106
  "description": "De beheerder heeft app-encryptie ingeschakeld. Voer het app-wachtwoord in om de app te ontgrendelen. Het wachtwoord hoeft slechts één keer te worden ingevoerd.",
106
107
  "placeholder": "Voer het wachtwoord in",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Dodaj adres proxy OpenAI (opcjonalnie)",
89
89
  "closeMessage": "Zamknij komunikat",
90
90
  "confirm": "Potwierdź i spróbuj ponownie",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Pobierz",
94
- "description": "Wprowadź etykietę modelu Ollama, aby kontynuować sesję.",
95
- "title": "Pobierz określony model Ollama"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Administrator włączył jednolite uwierzytelnianie logowania. Kliknij poniższy przycisk, aby się zalogować i odblokować aplikację.",
100
93
  "success": "Zalogowano pomyślnie",
101
94
  "title": "Zaloguj się",
102
95
  "welcome": "Witaj!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Anuluj",
99
+ "confirm": "Potwierdź",
100
+ "description": "Wprowadź etykietę modelu Ollama, aby kontynuować sesję",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Rozpoczynanie pobierania...",
103
+ "title": "Pobierz określony model Ollama"
104
+ },
104
105
  "password": {
105
106
  "description": "Administrator włączył szyfrowanie aplikacji. Po wprowadzeniu hasła aplikacja zostanie odblokowana. Hasło należy wprowadzić tylko raz.",
106
107
  "placeholder": "Wprowadź hasło",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Adicionar URL de proxy OpenAI (opcional)",
89
89
  "closeMessage": "Fechar mensagem",
90
90
  "confirm": "Confirmar e tentar novamente",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Baixar",
94
- "description": "Digite as tags do seu modelo Ollama para continuar a sessão",
95
- "title": "Baixar o modelo Ollama especificado"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "O administrador ativou a autenticação de login unificado. Clique no botão abaixo para fazer login e desbloquear o aplicativo.",
100
93
  "success": "Login bem-sucedido",
101
94
  "title": "Faça login na sua conta",
102
95
  "welcome": "Bem-vindo!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Cancelar",
99
+ "confirm": "Confirmar",
100
+ "description": "Digite suas tags de modelo Ollama para continuar a sessão",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Iniciando download...",
103
+ "title": "Baixar modelo Ollama específico"
104
+ },
104
105
  "password": {
105
106
  "description": "O administrador ativou a criptografia do aplicativo. Insira a senha do aplicativo para desbloqueá-lo. A senha só precisa ser inserida uma vez.",
106
107
  "placeholder": "Insira a senha",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Добавить URL прокси-сервера OpenAI (необязательно)",
89
89
  "closeMessage": "Закрыть сообщение",
90
90
  "confirm": "Подтвердить и повторить попытку",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Скачать",
94
- "description": "Введите метку вашей модели Ollama, чтобы продолжить сеанс",
95
- "title": "Скачать указанную модель Ollama"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Администратор включил единую систему аутентификации. Нажмите кнопку ниже, чтобы войти и разблокировать приложение.",
100
93
  "success": "Успешный вход",
101
94
  "title": "Вход в аккаунт",
102
95
  "welcome": "Добро пожаловать!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Отмена",
99
+ "confirm": "Подтвердить",
100
+ "description": "Введите метку вашей модели Ollama, чтобы продолжить разговор",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Начало загрузки...",
103
+ "title": "Загрузить указанную модель Ollama"
104
+ },
104
105
  "password": {
105
106
  "description": "Шифрование приложения включено администратором. Введите пароль приложения, чтобы разблокировать приложение. Пароль необходимо ввести только один раз.",
106
107
  "placeholder": "Введите пароль",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "OpenAI vekil adresi ekle (isteğe bağlı)",
89
89
  "closeMessage": "Mesajı kapat",
90
90
  "confirm": "Onayla ve Yeniden Dene",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "下载",
94
- "description": "Ollama model etiketinizi girin ve devam etmek için tamamlayın",
95
- "title": "Belirli Ollama modelini indir"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Yönetici, tek oturum açma kimlik doğrulamasını etkinleştirdi. Aşağıdaki düğmeye tıklayarak giriş yapabilir ve uygulamayı kilidini açabilirsiniz.",
100
93
  "success": "Giriş başarılı",
101
94
  "title": "Hesaba giriş yap",
102
95
  "welcome": "Hoş geldiniz!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "İptal",
99
+ "confirm": "Onayla",
100
+ "description": "Ollama model etiketinizi girin ve sohbeti devam ettirmek için tamamlayın",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "İndirme başlıyor...",
103
+ "title": "Belirtilen Ollama modelini indir"
104
+ },
104
105
  "password": {
105
106
  "description": "Uygulama şifrelemesi yönetici tarafından etkinleştirilmiştir. Uygulamayı açmak için uygulama şifresini girin. Şifre sadece bir kez doldurulmalıdır.",
106
107
  "placeholder": "Lütfen şifre girin",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "Thêm URL proxy OpenAI (tùy chọn)",
89
89
  "closeMessage": "Đóng thông báo",
90
90
  "confirm": "Xác nhận và thử lại",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "Tải xuống",
94
- "description": "Nhập nhãn mô hình Ollama của bạn để tiếp tục cuộc trò chuyện",
95
- "title": "Tải xuống mô hình Ollama cụ thể"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "Quản trị viên đã mở tính năng xác thực đăng nhập thống nhất. Nhấn vào nút bên dưới để đăng nhập và mở khóa ứng dụng",
100
93
  "success": "Đăng nhập thành công",
101
94
  "title": "Đăng nhập tài khoản",
102
95
  "welcome": "Chào mừng bạn!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "Hủy bỏ",
99
+ "confirm": "Tải xuống",
100
+ "description": "Nhập nhãn mô hình Ollama của bạn để tiếp tục cuộc trò chuyện",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "Bắt đầu tải xuống...",
103
+ "title": "Tải xuống mô hình Ollama cụ thể"
104
+ },
104
105
  "password": {
105
106
  "description": "Quản trị viên đã kích hoạt mã hóa ứng dụng. Nhập mật khẩu ứng dụng để mở khóa. Chỉ cần nhập mật khẩu một lần",
106
107
  "placeholder": "Nhập mật khẩu",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "添加 OpenAI 代理地址(可选)",
89
89
  "closeMessage": "关闭提示",
90
90
  "confirm": "确认并重试",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "下载",
94
- "description": "输入你的 Ollama 模型标签,完成即可继续会话",
95
- "title": "下载指定的 Ollama 模型"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "管理员已开启统一登录认证,点击下方按钮登录,即可解锁应用",
100
93
  "success": "登录成功",
101
94
  "title": "登录账号",
102
95
  "welcome": "欢迎你!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "取消下载",
99
+ "confirm": "下载",
100
+ "description": "输入你的 Ollama 模型标签,完成即可继续会话",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "开始下载...",
103
+ "title": "下载指定的 Ollama 模型"
104
+ },
104
105
  "password": {
105
106
  "description": "管理员已开启应用加密,输入应用密码后即可解锁应用。密码只需填写一次",
106
107
  "placeholder": "请输入密码",
@@ -88,19 +88,20 @@
88
88
  "addProxyUrl": "新增 OpenAI 代理網址(選填)",
89
89
  "closeMessage": "關閉提示",
90
90
  "confirm": "確認並重試",
91
- "model": {
92
- "Ollama": {
93
- "confirm": "下載",
94
- "description": "輸入你的 Ollama 模型標籤,完成即可繼續會話",
95
- "title": "下載指定的 Ollama 模型"
96
- }
97
- },
98
91
  "oauth": {
99
92
  "description": "管理員已開啟統一登錄認證,點擊下方按鈕登錄,即可解鎖應用",
100
93
  "success": "登錄成功",
101
94
  "title": "登錄帳號",
102
95
  "welcome": "歡迎你!"
103
96
  },
97
+ "ollama": {
98
+ "cancel": "取消下載",
99
+ "confirm": "下載",
100
+ "description": "輸入您的 Ollama 模型標籤,完成後即可繼續會話",
101
+ "downloaded": "{{completed}} / {{total}}",
102
+ "starting": "開始下載...",
103
+ "title": "下載指定的 Ollama 模型"
104
+ },
104
105
  "password": {
105
106
  "description": "管理員已啟用應用程式加密,輸入應用程式密碼後即可解鎖應用程式。密碼只需填寫一次。",
106
107
  "placeholder": "請輸入密碼",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.148.1",
3
+ "version": "0.148.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",
@@ -15,6 +15,18 @@ const Groq: ModelProviderCard = {
15
15
  id: 'gemma-7b-it',
16
16
  tokens: 8192,
17
17
  },
18
+ {
19
+ displayName: 'LLaMA3-3-8B',
20
+ enabled: true,
21
+ id: 'llama3-8b-8192',
22
+ tokens: 8192,
23
+ },
24
+ {
25
+ displayName: 'LLaMA3-3-70B',
26
+ enabled: true,
27
+ id: 'llama3-70b-8192',
28
+ tokens: 8192,
29
+ },
18
30
  {
19
31
  displayName: 'LLaMA2-70b-chat',
20
32
  enabled: true,
@@ -15,6 +15,12 @@ const Mistral: ModelProviderCard = {
15
15
  id: 'open-mixtral-8x7b',
16
16
  tokens: 32_768,
17
17
  },
18
+ {
19
+ displayName: 'Mixtral 8x22B',
20
+ enabled: true,
21
+ id: 'open-mixtral-8x22b',
22
+ tokens: 65_536,
23
+ },
18
24
  {
19
25
  displayName: 'Mistral Small',
20
26
  enabled: true,
@@ -10,7 +10,7 @@ import { ollamaService } from '@/services/ollama';
10
10
  import { useChatStore } from '@/store/chat';
11
11
 
12
12
  import { ErrorActionContainer, FormAction } from '../style';
13
- import { useDownloadMonitor } from './useDownloadMonitor';
13
+ import { formatSize, useDownloadMonitor } from './useDownloadMonitor';
14
14
 
15
15
  interface OllamaModelFormProps {
16
16
  id: string;
@@ -61,12 +61,12 @@ const OllamaModelForm = memo<OllamaModelFormProps>(({ id, model }) => {
61
61
  <FormAction
62
62
  avatar={<Ollama color={theme.colorPrimary} size={64} />}
63
63
  description={
64
- isDownloading ? settingT('ollama.download.desc') : t('unlock.model.Ollama.description')
64
+ isDownloading ? settingT('ollama.download.desc') : t('unlock.ollama.description')
65
65
  }
66
66
  title={
67
67
  isDownloading
68
68
  ? settingT('ollama.download.title', { model: modelToPull })
69
- : t('unlock.model.Ollama.title')
69
+ : t('unlock.ollama.title')
70
70
  }
71
71
  >
72
72
  {!isDownloading && (
@@ -110,15 +110,33 @@ const OllamaModelForm = memo<OllamaModelFormProps>(({ id, model }) => {
110
110
  style={{ marginTop: 8 }}
111
111
  type={'primary'}
112
112
  >
113
- {t('unlock.model.Ollama.confirm')}
114
- </Button>
115
- <Button
116
- onClick={() => {
117
- deleteMessage(id);
118
- }}
119
- >
120
- {t('unlock.closeMessage')}
113
+ {!isDownloading
114
+ ? t('unlock.ollama.confirm')
115
+ : // if total is 0, show starting, else show downloaded
116
+ !total
117
+ ? t('unlock.ollama.starting')
118
+ : t('unlock.ollama.downloaded', {
119
+ completed: formatSize(completed),
120
+ total: formatSize(total),
121
+ })}
121
122
  </Button>
123
+ {isDownloading ? (
124
+ <Button
125
+ onClick={() => {
126
+ ollamaService.abort();
127
+ }}
128
+ >
129
+ {t('unlock.ollama.cancel')}
130
+ </Button>
131
+ ) : (
132
+ <Button
133
+ onClick={() => {
134
+ deleteMessage(id);
135
+ }}
136
+ >
137
+ {t('unlock.closeMessage')}
138
+ </Button>
139
+ )}
122
140
  </Flexbox>
123
141
  </Center>
124
142
  );
@@ -1,15 +1,22 @@
1
- import { useEffect, useMemo, useState } from 'react';
2
-
3
- const formatSpeed = (speed: number): string => {
4
- const kbPerSecond = speed / 1024;
5
- if (kbPerSecond < 1024) {
6
- return `${kbPerSecond.toFixed(1)} KB/s`;
1
+ import { useEffect, useRef, useState } from 'react';
2
+
3
+ export const formatSize = (bytes: number): string => {
4
+ const kbSize = bytes / 1024;
5
+ if (kbSize < 1024) {
6
+ return `${kbSize.toFixed(1)} KB`;
7
+ } else if (kbSize < 1_048_576) {
8
+ const mbSize = kbSize / 1024;
9
+ return `${mbSize.toFixed(1)} MB`;
7
10
  } else {
8
- const mbPerSecond = kbPerSecond / 1024;
9
- return `${mbPerSecond.toFixed(1)} MB/s`;
11
+ const gbSize = kbSize / 1_048_576;
12
+ return `${gbSize.toFixed(1)} GB`;
10
13
  }
11
14
  };
12
15
 
16
+ const formatSpeed = (speed: number): string => {
17
+ return `${formatSize(speed)}/s`;
18
+ };
19
+
13
20
  const formatTime = (timeInSeconds: number): string => {
14
21
  if (timeInSeconds < 60) {
15
22
  return `${timeInSeconds.toFixed(1)} s`;
@@ -21,28 +28,27 @@ const formatTime = (timeInSeconds: number): string => {
21
28
  };
22
29
 
23
30
  export const useDownloadMonitor = (totalSize: number, completedSize: number) => {
24
- const [startTime, setStartTime] = useState<number>(Date.now());
25
31
  const [downloadSpeed, setDownloadSpeed] = useState<string>('0 KB/s');
26
32
  const [remainingTime, setRemainingTime] = useState<string>('-');
27
33
 
28
- const isReady = useMemo(() => completedSize > 0, [completedSize]);
34
+ const lastCompletedRef = useRef(completedSize);
35
+ const lastTimedRef = useRef(Date.now());
29
36
 
30
37
  useEffect(() => {
31
38
  const currentTime = Date.now();
32
- // mark as start download
33
- if (isReady) {
34
- const elapsedTime = (currentTime - startTime) / 1000; // in seconds
35
- const speed = completedSize / elapsedTime; // in bytes per second
39
+ const elapsedTime = (currentTime - lastTimedRef.current) / 1000; // in seconds
40
+ if (completedSize > 0 && elapsedTime > 1) {
41
+ const speed = Math.max(0, (completedSize - lastCompletedRef.current) / elapsedTime); // in bytes per second
42
+ setDownloadSpeed(formatSpeed(speed));
36
43
 
37
44
  const remainingSize = totalSize - completedSize;
38
45
  const time = remainingSize / speed; // in seconds
39
-
40
- setDownloadSpeed(formatSpeed(speed));
41
46
  setRemainingTime(formatTime(time));
42
- } else {
43
- setStartTime(currentTime);
47
+
48
+ lastCompletedRef.current = completedSize;
49
+ lastTimedRef.current = currentTime;
44
50
  }
45
- }, [isReady, completedSize]);
51
+ }, [completedSize]);
46
52
 
47
53
  return { downloadSpeed, remainingTime };
48
54
  };
@@ -111,19 +111,20 @@ export default {
111
111
  addProxyUrl: '添加 OpenAI 代理地址(可选)',
112
112
  closeMessage: '关闭提示',
113
113
  confirm: '确认并重试',
114
- model: {
115
- Ollama: {
116
- confirm: '下载',
117
- description: '输入你的 Ollama 模型标签,完成即可继续会话',
118
- title: '下载指定的 Ollama 模型',
119
- },
120
- },
121
114
  oauth: {
122
115
  description: '管理员已开启统一登录认证,点击下方按钮登录,即可解锁应用',
123
116
  success: '登录成功',
124
117
  title: '登录账号',
125
118
  welcome: '欢迎你!',
126
119
  },
120
+ ollama: {
121
+ cancel: '取消下载',
122
+ confirm: '下载',
123
+ description: '输入你的 Ollama 模型标签,完成即可继续会话',
124
+ downloaded: '{{completed}} / {{total}}',
125
+ starting: '开始下载...',
126
+ title: '下载指定的 Ollama 模型',
127
+ },
127
128
  password: {
128
129
  description: '管理员已开启应用加密,输入应用密码后即可解锁应用。密码只需填写一次',
129
130
  placeholder: '请输入密码',
@@ -1,9 +1,11 @@
1
1
  import { Mock, describe, expect, it, vi } from 'vitest';
2
2
 
3
- import { ollamaService } from '../ollama';
3
+ import { OllamaService } from '../ollama';
4
4
 
5
5
  vi.stubGlobal('fetch', vi.fn());
6
6
 
7
+ const ollamaService = new OllamaService({ fetch });
8
+
7
9
  describe('OllamaService', () => {
8
10
  describe('list models', async () => {
9
11
  it('should make a GET request with the correct payload', async () => {
@@ -11,7 +13,7 @@ describe('OllamaService', () => {
11
13
 
12
14
  expect(await ollamaService.getModels()).toEqual({ models: [] });
13
15
 
14
- expect(global.fetch).toHaveBeenCalled();
16
+ expect(fetch).toHaveBeenCalled();
15
17
  });
16
18
 
17
19
  it('should make a GET request with the error', async () => {
@@ -20,7 +22,7 @@ describe('OllamaService', () => {
20
22
 
21
23
  await expect(ollamaService.getModels()).rejects.toThrow();
22
24
 
23
- expect(global.fetch).toHaveBeenCalled();
25
+ expect(fetch).toHaveBeenCalled();
24
26
  });
25
27
  });
26
28
  });
@@ -9,7 +9,21 @@ import { getMessageError } from '@/utils/fetch';
9
9
 
10
10
  const DEFAULT_BASE_URL = 'http://127.0.0.1:11434/v1';
11
11
 
12
- class OllamaService {
12
+ interface OllamaServiceParams {
13
+ fetch?: typeof fetch;
14
+ }
15
+
16
+ export class OllamaService {
17
+ private _host: string;
18
+ private _client: OllamaBrowser;
19
+ private _fetch?: typeof fetch;
20
+
21
+ constructor(params: OllamaServiceParams = {}) {
22
+ this._host = this.getHost();
23
+ this._fetch = params.fetch;
24
+ this._client = new OllamaBrowser({ fetch: params?.fetch, host: this._host });
25
+ }
26
+
13
27
  getHost = (): string => {
14
28
  const config = modelConfigSelectors.ollamaConfig(useGlobalStore.getState());
15
29
 
@@ -18,7 +32,15 @@ class OllamaService {
18
32
  };
19
33
 
20
34
  getOllamaClient = () => {
21
- return new OllamaBrowser({ host: this.getHost() });
35
+ if (this.getHost() !== this._host) {
36
+ this._host = this.getHost();
37
+ this._client = new OllamaBrowser({ fetch: this._fetch, host: this.getHost() });
38
+ }
39
+ return this._client;
40
+ };
41
+
42
+ abort = () => {
43
+ this._client.abort();
22
44
  };
23
45
 
24
46
  pullModel = async (model: string): Promise<AsyncGenerator<ProgressResponse>> => {