diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b96afca3af6..cf441b8516f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,64 @@ # Changelog +### [Version 1.15.28](https://github.com/lobehub/lobe-chat/compare/v1.15.27...v1.15.28) + +Released on **2024-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Update baichuan param. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Update baichuan param, closes [#3356](https://github.com/lobehub/lobe-chat/issues/3356) ([29bced1](https://github.com/lobehub/lobe-chat/commit/29bced1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.27](https://github.com/lobehub/lobe-chat/compare/v1.15.26...v1.15.27) + +Released on **2024-09-09** + +#### ♻ Code Refactoring + +- **misc**: Refactor brand implement for better custom. + +#### 💄 Styles + +- **misc**: Add siliconcloud new model. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor brand implement for better custom, closes [#3868](https://github.com/lobehub/lobe-chat/issues/3868) ([815b366](https://github.com/lobehub/lobe-chat/commit/815b366)) + +#### Styles + +- **misc**: Add siliconcloud new model, closes [#3865](https://github.com/lobehub/lobe-chat/issues/3865) ([c6b5a45](https://github.com/lobehub/lobe-chat/commit/c6b5a45)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 1.15.26](https://github.com/lobehub/lobe-chat/compare/v1.15.25...v1.15.26) Released on **2024-09-09** diff --git a/locales/ar/chat.json b/locales/ar/chat.json index 4ca6d18a660d..5e5be6aed220 100644 --- a/locales/ar/chat.json +++ b/locales/ar/chat.json @@ -43,7 +43,7 @@ "all": "جميع المحتويات", "allFiles": "جميع الملفات", "allKnowledgeBases": "جميع قواعد المعرفة", - "disabled": "وضع النشر الحالي لا يدعم محادثات قاعدة المعرفة، إذا كنت ترغب في الاستخدام، يرجى التبديل إلى نشر قاعدة البيانات على الخادم أو استخدام خدمة LobeChat Cloud", + "disabled": "الوضع الحالي للنشر لا يدعم محادثات قاعدة المعرفة. إذا كنت بحاجة إلى استخدامها، يرجى التبديل إلى نشر قاعدة البيانات على الخادم أو استخدام خدمة {{cloud}}.", "library": { "action": { "add": "إضافة", diff --git a/locales/ar/error.json b/locales/ar/error.json index 8108311fcc69..e295ad365022 100644 --- a/locales/ar/error.json +++ b/locales/ar/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "التفاصيل: {{detail}}", - "fileOnlySupportInServerMode": "وضع النشر الحالي لا يدعم تحميل ملفات غير الصور. إذا كنت بحاجة إلى تحميل تنسيق {{ext}}، يرجى التبديل إلى نشر قاعدة بيانات الخادم أو استخدام خدمة LobeChat Cloud.", + "fileOnlySupportInServerMode": "وضع النشر الحالي لا يدعم تحميل ملفات غير الصور. إذا كنت بحاجة إلى تحميل تنسيق {{ext}}، يرجى التبديل إلى نشر قاعدة البيانات على الخادم أو استخدام خدمة {{cloud}}.", "networkError": "يرجى التأكد من أن اتصال الشبكة لديك يعمل بشكل صحيح، والتحقق من إعدادات تكوين خدمة تخزين الملفات عبر النطاق.", "title": "فشل تحميل الملف، يرجى التحقق من الاتصال بالشبكة أو المحاولة لاحقًا", "unknownError": "سبب الخطأ: {{reason}}", diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.json index 30958814c5be..971d4e3dc2c1 100644 --- a/locales/bg-BG/chat.json +++ b/locales/bg-BG/chat.json @@ -43,7 +43,7 @@ "all": "Всички съдържания", "allFiles": "Всички файлове", "allKnowledgeBases": "Всички знания", - "disabled": "Текущият режим на внедряване не поддържа диалози с база знания. За да използвате, моля, превключете на внедряване с база данни на сървъра или използвайте услугата LobeChat Cloud.", + "disabled": "Текущият режим на внедряване не поддържа разговори с база знания. Ако искате да използвате тази функция, моля, превключете на внедряване с база данни на сървъра или използвайте услугата {{cloud}}.", "library": { "action": { "add": "Добави", diff --git a/locales/bg-BG/error.json b/locales/bg-BG/error.json index 51018c7127ce..46b17701a71e 100644 --- a/locales/bg-BG/error.json +++ b/locales/bg-BG/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Подробности: {{detail}}", - "fileOnlySupportInServerMode": "Текущият режим на разполагане не поддържа качване на файлове, различни от изображения. За да качите формат {{ext}}, моля, превключете на разполагане с база данни на сървъра или използвайте услугата LobeChat Cloud.", + "fileOnlySupportInServerMode": "Текущият режим на разполагане не поддържа качване на файлове, различни от изображения. Ако искате да качите формат {{ext}}, моля, превключете на разполагане с база данни на сървъра или използвайте услугата {{cloud}}.", "networkError": "Моля, уверете се, че вашата мрежа работи нормално и проверете дали конфигурацията за крос-домейн на услугата за съхранение на файлове е правилна.", "title": "Неуспешно качване на файл, моля проверете интернет връзката или опитайте по-късно", "unknownError": "Причина за грешка: {{reason}}", diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.json index 148e78b348a5..b18cd94703ac 100644 --- a/locales/de-DE/chat.json +++ b/locales/de-DE/chat.json @@ -43,7 +43,7 @@ "all": "Alle Inhalte", "allFiles": "Alle Dateien", "allKnowledgeBases": "Alle Wissensdatenbanken", - "disabled": "Der aktuelle Bereitstellungsmodus unterstützt keine Wissensdatenbankgespräche. Bitte wechseln Sie zur serverseitigen Datenbankbereitstellung oder verwenden Sie den LobeChat Cloud-Dienst.", + "disabled": "Der aktuelle Bereitstellungsmodus unterstützt keine Dialoge mit der Wissensdatenbank. Bitte wechseln Sie zur Bereitstellung mit einer Serverdatenbank oder nutzen Sie den {{cloud}}-Dienst.", "library": { "action": { "add": "Hinzufügen", diff --git a/locales/de-DE/error.json b/locales/de-DE/error.json index dcbcb7b2bdd1..b9e25991f8c2 100644 --- a/locales/de-DE/error.json +++ b/locales/de-DE/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Details: {{detail}}", - "fileOnlySupportInServerMode": "Der aktuelle Bereitstellungsmodus unterstützt das Hochladen von Nicht-Bilddateien nicht. Um Dateien im {{ext}}-Format hochzuladen, wechseln Sie bitte zum Serverdatenbank-Bereitstellungsmodus oder verwenden Sie den LobeChat Cloud-Dienst.", + "fileOnlySupportInServerMode": "Der aktuelle Bereitstellungsmodus unterstützt das Hochladen von Nicht-Bilddateien nicht. Um Dateien im {{ext}}-Format hochzuladen, wechseln Sie bitte zum Serverdatenbank-Bereitstellungsmodus oder verwenden Sie den {{cloud}}-Dienst.", "networkError": "Bitte überprüfen Sie, ob Ihre Internetverbindung stabil ist, und prüfen Sie die Cross-Origin-Konfiguration des Dateispeicherdienstes.", "title": "Dateiupload fehlgeschlagen. Bitte überprüfen Sie Ihre Netzwerkverbindung und versuchen Sie es später erneut.", "unknownError": "Fehlerursache: {{reason}}", diff --git a/locales/en-US/chat.json b/locales/en-US/chat.json index 21298d821925..9db04515a095 100644 --- a/locales/en-US/chat.json +++ b/locales/en-US/chat.json @@ -43,7 +43,7 @@ "all": "All Content", "allFiles": "All Files", "allKnowledgeBases": "All Knowledge Bases", - "disabled": "The current deployment mode does not support knowledge base conversations. To use this feature, please switch to server database deployment or use LobeChat Cloud service.", + "disabled": "The current deployment mode does not support knowledge base conversations. To use this feature, please switch to server-side database deployment or use the {{cloud}} service.", "library": { "action": { "add": "Add", diff --git a/locales/en-US/error.json b/locales/en-US/error.json index b214002dfddf..0401bda92ec2 100644 --- a/locales/en-US/error.json +++ b/locales/en-US/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Details: {{detail}}", - "fileOnlySupportInServerMode": "The current deployment mode does not support uploading non-image files. To upload files in {{ext}} format, please switch to server database deployment or use LobeChat Cloud service.", + "fileOnlySupportInServerMode": "The current deployment mode does not support uploading non-image files. To upload files in {{ext}} format, please switch to server database deployment or use the {{cloud}} service.", "networkError": "Please check your network connection and ensure that the file storage service's cross-origin configuration is correct.", "title": "File upload failed. Please check your network connection or try again later", "unknownError": "Error reason: {{reason}}", diff --git a/locales/es-ES/chat.json b/locales/es-ES/chat.json index aed5ce8afdb4..fe76585270d8 100644 --- a/locales/es-ES/chat.json +++ b/locales/es-ES/chat.json @@ -43,7 +43,7 @@ "all": "Todo el contenido", "allFiles": "Todos los archivos", "allKnowledgeBases": "Todas las bases de conocimiento", - "disabled": "El modo de implementación actual no admite conversaciones de base de conocimiento. Para usarlo, cambie a la implementación de base de datos del servidor o utilice el servicio LobeChat Cloud.", + "disabled": "El modo de implementación actual no admite conversaciones con la base de conocimientos. Si desea utilizar esta función, cambie a la implementación de base de datos en el servidor o utilice el servicio {{cloud}}.", "library": { "action": { "add": "Agregar", diff --git a/locales/es-ES/error.json b/locales/es-ES/error.json index 61b2dc6c03a8..eb15067cdee2 100644 --- a/locales/es-ES/error.json +++ b/locales/es-ES/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Detalles: {{detail}}", - "fileOnlySupportInServerMode": "El modo de implementación actual no admite la carga de archivos que no sean imágenes. Si desea cargar un archivo en formato {{ext}}, cambie a la implementación de base de datos en servidor o utilice el servicio LobeChat Cloud.", + "fileOnlySupportInServerMode": "El modo de implementación actual no admite la carga de archivos que no sean imágenes. Si necesita cargar un archivo en formato {{ext}}, cambie a la implementación de base de datos en servidor o utilice el servicio {{cloud}}.", "networkError": "Por favor, verifica que tu red esté funcionando correctamente y comprueba si la configuración de CORS del servicio de almacenamiento de archivos es correcta.", "title": "Error al subir el archivo, por favor verifica la conexión a internet o inténtalo de nuevo más tarde", "unknownError": "Razón del error: {{reason}}", diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.json index 942d3eb0118a..4bfd91d7356c 100644 --- a/locales/fr-FR/chat.json +++ b/locales/fr-FR/chat.json @@ -43,7 +43,7 @@ "all": "Tout le contenu", "allFiles": "Tous les fichiers", "allKnowledgeBases": "Toutes les bases de connaissances", - "disabled": "Le mode de déploiement actuel ne prend pas en charge les dialogues de la base de connaissances. Pour l'utiliser, veuillez passer à un déploiement de base de données côté serveur ou utiliser le service LobeChat Cloud.", + "disabled": "Le mode de déploiement actuel ne prend pas en charge les dialogues de la base de connaissances. Pour l'utiliser, veuillez passer à un déploiement de base de données sur serveur ou utiliser le service {{cloud}}.", "library": { "action": { "add": "Ajouter", diff --git a/locales/fr-FR/error.json b/locales/fr-FR/error.json index 2a4acf58cb78..3709bf2bde17 100644 --- a/locales/fr-FR/error.json +++ b/locales/fr-FR/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Détails : {{detail}}", - "fileOnlySupportInServerMode": "Le mode de déploiement actuel ne prend pas en charge le téléchargement de fichiers non image. Pour télécharger un format {{ext}}, veuillez passer à un déploiement de base de données côté serveur ou utiliser le service LobeChat Cloud.", + "fileOnlySupportInServerMode": "Le mode de déploiement actuel ne prend pas en charge le téléchargement de fichiers non image. Pour télécharger un format {{ext}}, veuillez passer à un déploiement de base de données côté serveur ou utiliser le service {{cloud}}.", "networkError": "Veuillez vérifier si votre réseau fonctionne correctement et assurez-vous que la configuration CORS du service de stockage de fichiers est correcte.", "title": "Échec de l'envoi du fichier, veuillez vérifier votre connexion réseau ou réessayer plus tard", "unknownError": "Raison de l'erreur : {{reason}}", diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.json index 92207b8e1610..6f5a043f2b91 100644 --- a/locales/it-IT/chat.json +++ b/locales/it-IT/chat.json @@ -43,7 +43,7 @@ "all": "Tutti i contenuti", "allFiles": "Tutti i file", "allKnowledgeBases": "Tutte le basi di conoscenza", - "disabled": "La modalità di distribuzione attuale non supporta le conversazioni con la base di conoscenza. Per utilizzare questa funzione, passare alla distribuzione del database server o utilizzare il servizio LobeChat Cloud.", + "disabled": "L'attuale modalità di distribuzione non supporta le conversazioni con la base di conoscenza. Se desideri utilizzarla, passa alla distribuzione del database server o utilizza il servizio {{cloud}}.", "library": { "action": { "add": "Aggiungi", diff --git a/locales/it-IT/error.json b/locales/it-IT/error.json index 8f8a56ae02cb..90a1da86660a 100644 --- a/locales/it-IT/error.json +++ b/locales/it-IT/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Dettagli: {{detail}}", - "fileOnlySupportInServerMode": "L'attuale modalità di distribuzione non supporta il caricamento di file non immagine. Se desideri caricare un formato {{ext}}, ti preghiamo di passare alla distribuzione del database sul server o di utilizzare il servizio LobeChat Cloud.", + "fileOnlySupportInServerMode": "L'attuale modalità di distribuzione non supporta il caricamento di file non immagine. Per caricare file in formato {{ext}}, si prega di passare alla distribuzione del database sul server o di utilizzare il servizio {{cloud}}.", "networkError": "Si prega di verificare che la connessione di rete sia stabile e controllare se la configurazione CORS del servizio di archiviazione file è corretta.", "title": "Caricamento del file fallito, controlla la connessione di rete o riprova più tardi", "unknownError": "Motivo dell'errore: {{reason}}", diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.json index 6aec34db659a..82720c3756f5 100644 --- a/locales/ja-JP/chat.json +++ b/locales/ja-JP/chat.json @@ -43,7 +43,7 @@ "all": "すべてのコンテンツ", "allFiles": "すべてのファイル", "allKnowledgeBases": "すべての知識ベース", - "disabled": "現在のデプロイモードでは知識ベースの対話はサポートされていません。使用するには、サーバー側のデータベースデプロイに切り替えるか、LobeChat Cloud サービスを利用してください。", + "disabled": "現在のデプロイモードでは知識ベースの対話はサポートされていません。使用するには、サーバー側のデータベースデプロイに切り替えるか、{{cloud}} サービスを利用してください。", "library": { "action": { "add": "追加", diff --git a/locales/ja-JP/error.json b/locales/ja-JP/error.json index 8d37e927d222..9048aaa213e2 100644 --- a/locales/ja-JP/error.json +++ b/locales/ja-JP/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "詳細: {{detail}}", - "fileOnlySupportInServerMode": "現在のデプロイモードでは、画像以外のファイルのアップロードはサポートされていません。{{ext}} 形式のファイルをアップロードするには、サーバーデータベースデプロイに切り替えるか、LobeChat Cloud サービスを使用してください。", + "fileOnlySupportInServerMode": "現在のデプロイモードでは、画像以外のファイルのアップロードはサポートされていません。{{ext}} 形式のファイルをアップロードするには、サーバーデータベースデプロイに切り替えるか、{{cloud}} サービスを使用してください。", "networkError": "ネットワークが正常であることを確認し、ファイルストレージサービスのクロスオリジン設定が正しいかどうかを確認してください。", "title": "ファイルのアップロードに失敗しました。ネットワーク接続を確認するか、後でもう一度お試しください", "unknownError": "エラーの原因: {{reason}}", diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.json index 2bd884df99a2..6583725ba2f3 100644 --- a/locales/ko-KR/chat.json +++ b/locales/ko-KR/chat.json @@ -43,7 +43,7 @@ "all": "모든 내용", "allFiles": "모든 파일", "allKnowledgeBases": "모든 지식 베이스", - "disabled": "현재 배포 모드에서는 지식 베이스 대화가 지원되지 않습니다. 사용하려면 서버 데이터베이스 배포로 전환하거나 LobeChat Cloud 서비스를 이용하세요.", + "disabled": "현재 배포 모드에서는 지식 기반 대화가 지원되지 않습니다. 사용하려면 서버 데이터베이스 배포로 전환하거나 {{cloud}} 서비스를 이용해 주십시오.", "library": { "action": { "add": "추가", diff --git a/locales/ko-KR/error.json b/locales/ko-KR/error.json index 10adea8887ac..b68d05737c4a 100644 --- a/locales/ko-KR/error.json +++ b/locales/ko-KR/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "상세 내용: {{detail}}", - "fileOnlySupportInServerMode": "현재 배포 모드에서는 이미지 파일이 아닌 파일 업로드를 지원하지 않습니다. {{ext}} 형식을 업로드하려면 서버 데이터베이스 배포로 전환하거나 LobeChat Cloud 서비스를 사용하세요.", + "fileOnlySupportInServerMode": "현재 배포 모드에서는 이미지 파일이 아닌 파일 업로드를 지원하지 않습니다. {{ext}} 형식을 업로드하려면 서버 데이터베이스 배포로 전환하거나 {{cloud}} 서비스를 사용하세요.", "networkError": "네트워크가 정상인지 확인하고 파일 저장 서비스의 교차 출처 구성도 올바른지 확인하세요.", "title": "파일 업로드 실패, 네트워크 연결을 확인하거나 나중에 다시 시도해주세요", "unknownError": "오류 원인: {{reason}}", diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.json index b517020206d8..e5f407ec66f3 100644 --- a/locales/nl-NL/chat.json +++ b/locales/nl-NL/chat.json @@ -43,7 +43,7 @@ "all": "Alle inhoud", "allFiles": "Alle bestanden", "allKnowledgeBases": "Alle kennisbanken", - "disabled": "De huidige implementatiemodus ondersteunt geen kennisbankgesprekken. Schakel over naar serverdatabase-implementatie of gebruik de LobeChat Cloud-service om dit te gebruiken.", + "disabled": "De huidige implementatiemodus ondersteunt geen kennisbankgesprekken. Als je dit wilt gebruiken, schakel dan over naar serverdatabase-implementatie of gebruik de {{cloud}}-dienst.", "library": { "action": { "add": "Toevoegen", diff --git a/locales/nl-NL/error.json b/locales/nl-NL/error.json index 8f84f8ade590..f682003b0940 100644 --- a/locales/nl-NL/error.json +++ b/locales/nl-NL/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Details: {{detail}}", - "fileOnlySupportInServerMode": "De huidige implementatiemodus ondersteunt het uploaden van niet-afbeeldingsbestanden niet. Als u bestanden in {{ext}}-formaat wilt uploaden, schakelt u over naar de serverdatabase-implementatie of gebruikt u de LobeChat Cloud-service.", + "fileOnlySupportInServerMode": "De huidige implementatiemodus ondersteunt het uploaden van niet-afbeeldingsbestanden niet. Als u bestanden in {{ext}}-formaat wilt uploaden, schakelt u over naar de serverdatabase-implementatie of gebruikt u de {{cloud}}-dienst.", "networkError": "Controleer of je netwerk goed werkt en of de cross-origin configuratie van de bestandsopslagservice correct is.", "title": "Bestand uploaden mislukt, controleer uw internetverbinding of probeer het later opnieuw", "unknownError": "Foutreden: {{reason}}", diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.json index 4656286a2514..36f89c816196 100644 --- a/locales/pl-PL/chat.json +++ b/locales/pl-PL/chat.json @@ -43,7 +43,7 @@ "all": "Wszystkie treści", "allFiles": "Wszystkie pliki", "allKnowledgeBases": "Wszystkie bazy wiedzy", - "disabled": "Aktualny tryb wdrożenia nie obsługuje rozmów z bazą wiedzy. Aby korzystać, przełącz się na wdrożenie bazy danych serwera lub skorzystaj z usługi LobeChat Cloud.", + "disabled": "Obecny tryb wdrożenia nie obsługuje rozmów z bazą wiedzy. Aby z niej skorzystać, przełącz się na wdrożenie z bazą danych serwera lub skorzystaj z usługi {{cloud}}.", "library": { "action": { "add": "Dodaj", diff --git a/locales/pl-PL/error.json b/locales/pl-PL/error.json index 2a7307ed0cba..57f476fc6e1c 100644 --- a/locales/pl-PL/error.json +++ b/locales/pl-PL/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Szczegóły: {{detail}}", - "fileOnlySupportInServerMode": "Aktualny tryb wdrożenia nie obsługuje przesyłania plików, które nie są obrazami. Aby przesłać pliki w formacie {{ext}}, przełącz się na wdrożenie bazy danych na serwerze lub skorzystaj z usługi LobeChat Cloud.", + "fileOnlySupportInServerMode": "Aktualny tryb wdrożenia nie obsługuje przesyłania plików, które nie są obrazami. Aby przesłać pliki w formacie {{ext}}, przełącz się na wdrożenie bazy danych na serwerze lub skorzystaj z usługi {{cloud}}.", "networkError": "Proszę upewnić się, że Twoja sieć działa poprawnie oraz sprawdzić, czy konfiguracja CORS dla usługi przechowywania plików jest prawidłowa.", "title": "Nie udało się przesłać pliku. Sprawdź połączenie sieciowe lub spróbuj ponownie później", "unknownError": "Przyczyna błędu: {{reason}}", diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.json index 06b37d5dd917..ffd257383428 100644 --- a/locales/pt-BR/chat.json +++ b/locales/pt-BR/chat.json @@ -43,7 +43,7 @@ "all": "Todo conteúdo", "allFiles": "Todos os arquivos", "allKnowledgeBases": "Todos os bancos de conhecimento", - "disabled": "O modo de implantação atual não suporta diálogos de banco de conhecimento. Para usar, mude para a implantação de banco de dados no servidor ou utilize o serviço LobeChat Cloud.", + "disabled": "O modo de implantação atual não suporta diálogos com a base de conhecimento. Para utilizá-lo, por favor, mude para a implantação do banco de dados no servidor ou utilize o serviço {{cloud}}.", "library": { "action": { "add": "Adicionar", diff --git a/locales/pt-BR/error.json b/locales/pt-BR/error.json index d44a0d8bb634..be23515dfa33 100644 --- a/locales/pt-BR/error.json +++ b/locales/pt-BR/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Detalhes: {{detail}}", - "fileOnlySupportInServerMode": "O modo de implantação atual não suporta o upload de arquivos que não sejam imagens. Para fazer o upload de arquivos no formato {{ext}}, por favor, mude para a implantação do banco de dados no servidor ou utilize o serviço LobeChat Cloud.", + "fileOnlySupportInServerMode": "O modo de implantação atual não suporta o upload de arquivos que não sejam imagens. Para fazer o upload de arquivos no formato {{ext}}, mude para a implantação do banco de dados no servidor ou utilize o serviço {{cloud}}.", "networkError": "Por favor, verifique se sua rede está funcionando corretamente e se a configuração de CORS do serviço de armazenamento de arquivos está correta.", "title": "Falha ao enviar o arquivo, verifique a conexão de rede ou tente novamente mais tarde", "unknownError": "Erro: {{reason}}", diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.json index 581577efeeca..8ab984276ef9 100644 --- a/locales/ru-RU/chat.json +++ b/locales/ru-RU/chat.json @@ -43,7 +43,7 @@ "all": "Все содержимое", "allFiles": "Все файлы", "allKnowledgeBases": "Все базы знаний", - "disabled": "Текущий режим развертывания не поддерживает диалоги с базой знаний. Для использования переключитесь на развертывание серверной базы данных или используйте LobeChat Cloud сервис.", + "disabled": "Текущий режим развертывания не поддерживает диалоги с базой знаний. Для использования, пожалуйста, переключитесь на развертывание с серверной базой данных или используйте {{cloud}} сервис.", "library": { "action": { "add": "Добавить", diff --git a/locales/ru-RU/error.json b/locales/ru-RU/error.json index dc111afb3ee7..bf345273590a 100644 --- a/locales/ru-RU/error.json +++ b/locales/ru-RU/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Подробности: {{detail}}", - "fileOnlySupportInServerMode": "Текущий режим развертывания не поддерживает загрузку файлов, отличных от изображений. Если вы хотите загрузить файл формата {{ext}}, пожалуйста, переключитесь на развертывание с серверной базой данных или используйте LobeChat Cloud.", + "fileOnlySupportInServerMode": "Текущий режим развертывания не поддерживает загрузку файлов, отличных от изображений. Чтобы загрузить файл формата {{ext}}, пожалуйста, переключитесь на развертывание с серверной базой данных или используйте сервис {{cloud}}.", "networkError": "Пожалуйста, убедитесь, что ваше соединение с сетью работает нормально, и проверьте правильность конфигурации кросс-доменных запросов для службы хранения файлов.", "title": "Ошибка загрузки файла. Проверьте подключение к сети или попробуйте позже", "unknownError": "Причина ошибки: {{reason}}", diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.json index 5c670b9a27be..a42566fd9b00 100644 --- a/locales/tr-TR/chat.json +++ b/locales/tr-TR/chat.json @@ -43,7 +43,7 @@ "all": "Tüm İçerik", "allFiles": "Tüm Dosyalar", "allKnowledgeBases": "Tüm Bilgi Tabanları", - "disabled": "Mevcut dağıtım modu bilgi tabanı sohbetini desteklemiyor, kullanmak için lütfen sunucu veritabanı dağıtımına geçin veya LobeChat Cloud hizmetini kullanın.", + "disabled": "Mevcut dağıtım modu bilgi tabanı sohbetini desteklemiyor. Kullanmak istiyorsanız, lütfen sunucu veritabanı dağıtımına geçin veya {{cloud}} hizmetini kullanın.", "library": { "action": { "add": "Ekle", diff --git a/locales/tr-TR/error.json b/locales/tr-TR/error.json index da5190fb38db..dad86c56d6ab 100644 --- a/locales/tr-TR/error.json +++ b/locales/tr-TR/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Detay: {{detail}}", - "fileOnlySupportInServerMode": "Mevcut dağıtım modu, yalnızca resim dosyalarının yüklenmesini desteklemektedir. {{ext}} formatında bir dosya yüklemek istiyorsanız, lütfen sunucu veritabanı dağıtımına geçin veya LobeChat Cloud hizmetini kullanın.", + "fileOnlySupportInServerMode": "Mevcut dağıtım modu, yalnızca resim dosyalarının yüklenmesini desteklemektedir. {{ext}} formatında bir dosya yüklemek istiyorsanız, lütfen sunucu veritabanı dağıtımına geçin veya {{cloud}} hizmetini kullanın.", "networkError": "Lütfen ağ bağlantınızın düzgün çalıştığından emin olun ve dosya depolama hizmetinin çapraz alan yapılandırmasının doğru olup olmadığını kontrol edin.", "title": "Dosya yükleme başarısız, lütfen ağ bağlantınızı kontrol edin veya daha sonra tekrar deneyin", "unknownError": "Hata nedeni: {{reason}}", diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.json index 49e4a8d30127..95be73622682 100644 --- a/locales/vi-VN/chat.json +++ b/locales/vi-VN/chat.json @@ -43,7 +43,7 @@ "all": "Tất cả nội dung", "allFiles": "Tất cả tệp", "allKnowledgeBases": "Tất cả kho kiến thức", - "disabled": "Chế độ triển khai hiện tại không hỗ trợ đối thoại kho kiến thức, nếu muốn sử dụng, vui lòng chuyển sang triển khai cơ sở dữ liệu máy chủ hoặc sử dụng dịch vụ LobeChat Cloud", + "disabled": "Chế độ triển khai hiện tại không hỗ trợ đối thoại với cơ sở kiến thức. Nếu bạn muốn sử dụng, hãy chuyển sang triển khai cơ sở dữ liệu máy chủ hoặc sử dụng dịch vụ {{cloud}}.", "library": { "action": { "add": "Thêm", diff --git a/locales/vi-VN/error.json b/locales/vi-VN/error.json index b3c60b6e1628..106fff39ec01 100644 --- a/locales/vi-VN/error.json +++ b/locales/vi-VN/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "Chi tiết: {{detail}}", - "fileOnlySupportInServerMode": "Chế độ triển khai hiện tại không hỗ trợ tải lên các tệp không phải hình ảnh. Nếu bạn cần tải lên định dạng {{ext}}, vui lòng chuyển sang triển khai cơ sở dữ liệu trên máy chủ hoặc sử dụng dịch vụ LobeChat Cloud.", + "fileOnlySupportInServerMode": "Chế độ triển khai hiện tại không hỗ trợ tải lên các tệp không phải hình ảnh. Nếu bạn muốn tải lên định dạng {{ext}}, vui lòng chuyển sang triển khai cơ sở dữ liệu trên máy chủ hoặc sử dụng dịch vụ {{cloud}}.", "networkError": "Vui lòng kiểm tra xem mạng của bạn có hoạt động bình thường không và kiểm tra cấu hình chia sẻ tệp giữa các miền có đúng không", "title": "Tải lên tệp thất bại, vui lòng kiểm tra kết nối mạng hoặc thử lại sau", "unknownError": "Lỗi: {{reason}}", diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.json index 05ead9a0b902..b94fb5f3e101 100644 --- a/locales/zh-CN/chat.json +++ b/locales/zh-CN/chat.json @@ -43,7 +43,7 @@ "all": "所有内容", "allFiles": "所有文件", "allKnowledgeBases": "所有知识库", - "disabled": "当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 LobeChat Cloud 服务", + "disabled": "当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 {{cloud}} 服务", "library": { "action": { "add": "添加", diff --git a/locales/zh-CN/error.json b/locales/zh-CN/error.json index 7a92455d782a..96b708a26676 100644 --- a/locales/zh-CN/error.json +++ b/locales/zh-CN/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "详情: {{detail}}", - "fileOnlySupportInServerMode": "当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 LobeChat Cloud 服务", + "fileOnlySupportInServerMode": "当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 {{cloud}} 服务", "networkError": "请确认你的网络是否正常,并检查文件存储服务跨域配置是否正确", "title": "文件上传失败,请检查网络连接或稍后再试", "unknownError": "错误原因: {{reason}}", diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.json index 42d9c136fe6b..0988acb9de24 100644 --- a/locales/zh-TW/chat.json +++ b/locales/zh-TW/chat.json @@ -43,7 +43,7 @@ "all": "所有內容", "allFiles": "所有檔案", "allKnowledgeBases": "所有知識庫", - "disabled": "當前部署模式不支持知識庫對話,如需使用,請切換到伺服器端資料庫部署或使用 LobeChat Cloud 服務", + "disabled": "目前的部署模式不支援知識庫對話,如需使用,請切換到伺服器端資料庫部署或使用 {{cloud}} 服務", "library": { "action": { "add": "添加", diff --git a/locales/zh-TW/error.json b/locales/zh-TW/error.json index 29fd0681e501..7ef0288f1e50 100644 --- a/locales/zh-TW/error.json +++ b/locales/zh-TW/error.json @@ -115,7 +115,7 @@ }, "upload": { "desc": "詳情: {{detail}}", - "fileOnlySupportInServerMode": "當前部署模式不支持上傳非圖片文件,如需上傳 {{ext}} 格式,請切換到伺服器端資料庫部署或使用 LobeChat Cloud 服務", + "fileOnlySupportInServerMode": "當前部署模式不支持上傳非圖片文件,如需上傳 {{ext}} 格式,請切換到伺服器數據庫部署或使用 {{cloud}} 服務", "networkError": "請確認你的網路是否正常,並檢查檔案儲存服務的跨域配置是否正確", "title": "檔案上傳失敗,請檢查網路連線或稍後再試", "unknownError": "錯誤原因: {{reason}}", diff --git a/package.json b/package.json index 484ae526960e..44bd8fc90532 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/chat", - "version": "1.15.26", + "version": "1.15.28", "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.", "keywords": [ "framework", diff --git a/public/images/logo.png b/public/images/logo.png deleted file mode 100644 index cc29879cf45b..000000000000 Binary files a/public/images/logo.png and /dev/null differ diff --git a/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx b/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx index c177549f4342..b19bffeda491 100644 --- a/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx +++ b/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx @@ -5,18 +5,24 @@ import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { DOCUMENTS_REFER_URL, GITHUB } from '@/const/url'; +import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig'; const BottomActions = memo(() => { const { t } = useTranslation('common'); + const { hideGitHub, hideDocs } = useServerConfigStore(featureFlagsSelectors); return ( <> - - - - - - + {!hideGitHub && ( + + + + )} + {!hideDocs && ( + + + + )} ); }); diff --git a/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx b/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx index a8576d2a2175..02f61b423f2c 100644 --- a/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +++ b/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx @@ -16,8 +16,7 @@ export interface TopActionProps { const TopActions = memo(({ tab }) => { const { t } = useTranslation('common'); const switchBackToChat = useGlobalStore((s) => s.switchBackToChat); - const { showMarket } = useServerConfigStore(featureFlagsSelectors); - const { enableKnowledgeBase } = useServerConfigStore(featureFlagsSelectors); + const { showMarket, enableKnowledgeBase } = useServerConfigStore(featureFlagsSelectors); return ( <> diff --git a/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx b/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx index 0553a12544a6..e1bfc2c7fd49 100644 --- a/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx +++ b/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx @@ -1,11 +1,11 @@ import { ModelTag } from '@lobehub/icons'; import { Avatar, ChatHeaderTitle, Markdown } from '@lobehub/ui'; -import { LobeChat } from '@lobehub/ui/brand'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { Flexbox } from 'react-layout-kit'; import pkg from '@/../package.json'; +import { ProductLogo } from '@/components/Branding'; import ChatList from '@/features/Conversation/components/ChatList'; import { useAgentStore } from '@/store/agent'; import { agentSelectors } from '@/store/agent/selectors'; @@ -63,7 +63,7 @@ const Preview = memo( {withFooter ? ( - +
{pkg.homepage}
) : ( diff --git a/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx b/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx index 05fad7412b19..17be0c5c6716 100644 --- a/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx +++ b/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx @@ -18,6 +18,7 @@ import SessionSearchBar from '../../features/SessionSearchBar'; export const useStyles = createStyles(({ css, token }) => ({ logo: css` + color: ${token.colorText}; fill: ${token.colorText}; `, top: css` @@ -38,7 +39,7 @@ const Header = memo(() => { - + {enableWebrtc && } {showCreateSession && ( diff --git a/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx b/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx index fff736d392a9..f2830403127e 100644 --- a/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +++ b/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx @@ -24,7 +24,7 @@ const Header = memo(() => { left={ router.push('/me')} size={32} /> - + {enableWebrtc && } } diff --git a/src/app/(main)/market/_layout/Desktop/Header.tsx b/src/app/(main)/market/_layout/Desktop/Header.tsx index c78aace92936..aa879b3ad988 100644 --- a/src/app/(main)/market/_layout/Desktop/Header.tsx +++ b/src/app/(main)/market/_layout/Desktop/Header.tsx @@ -20,7 +20,7 @@ const Header = memo(() => { return ( } + left={} right={} /> ); diff --git a/src/app/(main)/settings/about/features/Version.tsx b/src/app/(main)/settings/about/features/Version.tsx index 84a2b65b403a..9a8589967662 100644 --- a/src/app/(main)/settings/about/features/Version.tsx +++ b/src/app/(main)/settings/about/features/Version.tsx @@ -1,11 +1,11 @@ import { Button, Tag } from 'antd'; import { createStyles } from 'antd-style'; -import Image from 'next/image'; import Link from 'next/link'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { Center, Flexbox } from 'react-layout-kit'; +import { ProductLogo } from '@/components/Branding'; import { BRANDING_NAME } from '@/const/branding'; import { MANUAL_UPGRADE_URL, OFFICIAL_SITE, RELEASES_URL } from '@/const/url'; import { CURRENT_VERSION } from '@/const/version'; @@ -38,7 +38,7 @@ const Version = memo<{ mobile?: boolean }>(({ mobile }) => {
- {BRANDING_NAME} +
diff --git a/src/app/(main)/settings/hooks/useCategory.tsx b/src/app/(main)/settings/hooks/useCategory.tsx index d0509b58db23..4afb134cf489 100644 --- a/src/app/(main)/settings/hooks/useCategory.tsx +++ b/src/app/(main)/settings/hooks/useCategory.tsx @@ -12,7 +12,8 @@ import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfi export const useCategory = () => { const { t } = useTranslation('setting'); - const { enableWebrtc, showLLM, enableSTT } = useServerConfigStore(featureFlagsSelectors); + const { enableWebrtc, showLLM, enableSTT, hideDocs } = + useServerConfigStore(featureFlagsSelectors); const cateItems: MenuProps['items'] = useMemo( () => @@ -77,7 +78,7 @@ export const useCategory = () => { ), }, - { + !hideDocs && { icon: , key: SettingsTabs.About, label: ( diff --git a/src/components/Branding/CustomLogo.tsx b/src/components/Branding/CustomLogo.tsx new file mode 100644 index 000000000000..198ac07c1561 --- /dev/null +++ b/src/components/Branding/CustomLogo.tsx @@ -0,0 +1,72 @@ +import { LobeChatProps } from '@lobehub/ui/brand'; +import Image from 'next/image'; +import { memo } from 'react'; +import { Flexbox } from 'react-layout-kit'; + +import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding'; + +interface ProductLogoProps { + className?: string; + extra?: string; + size?: number; + type?: LobeChatProps['type']; +} + +const CustomLogo = memo(({ size = 32, className, type }) => { + const textNode = ( + + {BRANDING_NAME} + + ); + + const imageNode = ( + {BRANDING_NAME} + ); + switch (type) { + case 'text': { + return textNode; + } + + case 'combine': { + return ( + + {imageNode} + {textNode} + + ); + } + + default: + case 'flat': + case 'mono': + case '3d': { + return ( + {BRANDING_NAME} + ); + } + } +}); + +export default CustomLogo; diff --git a/src/components/Branding/ProductLogo.tsx b/src/components/Branding/ProductLogo.tsx deleted file mode 100644 index 4a8761e786bc..000000000000 --- a/src/components/Branding/ProductLogo.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { LobeChat } from '@lobehub/ui/brand'; -import { memo } from 'react'; - -interface ProductLogoProps { - className?: string; - extra?: string; - size?: number; -} - -export const ProductLogo = memo(({ size, className, extra }) => { - return ; -}); - -export default ProductLogo; diff --git a/src/components/Branding/index.ts b/src/components/Branding/index.ts deleted file mode 100644 index bb38cca95f4c..000000000000 --- a/src/components/Branding/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ProductLogo } from './ProductLogo'; diff --git a/src/components/Branding/index.tsx b/src/components/Branding/index.tsx new file mode 100644 index 000000000000..66001a0b64ba --- /dev/null +++ b/src/components/Branding/index.tsx @@ -0,0 +1,21 @@ +import { LobeChat, LobeChatProps } from '@lobehub/ui/brand'; +import { memo } from 'react'; + +import { isCustomBranding } from '@/const/version'; + +import CustomLogo from './CustomLogo'; + +interface ProductLogoProps { + className?: string; + extra?: string; + size?: number; + type?: LobeChatProps['type']; +} + +export const ProductLogo = memo(({ size, className, extra, type }) => { + if (isCustomBranding) { + return ; + } + + return ; +}); diff --git a/src/components/FullscreenLoading/index.tsx b/src/components/FullscreenLoading/index.tsx index 0a2dd3f4a8c2..4405bdcf7a9a 100644 --- a/src/components/FullscreenLoading/index.tsx +++ b/src/components/FullscreenLoading/index.tsx @@ -1,14 +1,15 @@ import { Icon } from '@lobehub/ui'; -import { LobeChat } from '@lobehub/ui/brand'; import { Loader2 } from 'lucide-react'; import { memo } from 'react'; import { Center, Flexbox } from 'react-layout-kit'; +import { ProductLogo } from '@/components/Branding'; + const FullscreenLoading = memo<{ title?: string }>(({ title }) => { return (
- +
{title} diff --git a/src/components/PageTitle/index.tsx b/src/components/PageTitle/index.tsx index db23637ed0d4..f6653ffcdfd1 100644 --- a/src/components/PageTitle/index.tsx +++ b/src/components/PageTitle/index.tsx @@ -1,8 +1,10 @@ import { memo, useEffect } from 'react'; +import { BRANDING_NAME } from '@/const/branding'; + const PageTitle = memo<{ title: string }>(({ title }) => { useEffect(() => { - document.title = title ? `${title} · LobeChat` : 'LobeChat'; + document.title = title ? `${title} · ${BRANDING_NAME}` : BRANDING_NAME; }, [title]); return null; diff --git a/src/config/featureFlags/schema.ts b/src/config/featureFlags/schema.ts index 777e404d8228..07891a715445 100644 --- a/src/config/featureFlags/schema.ts +++ b/src/config/featureFlags/schema.ts @@ -3,7 +3,7 @@ import { z } from 'zod'; export const FeatureFlagsSchema = z.object({ /** - * + * Enable WebRTC sync */ webrtc_sync: z.boolean().optional(), check_updates: z.boolean().optional(), @@ -32,6 +32,12 @@ export const FeatureFlagsSchema = z.object({ // internal flag cloud_promotion: z.boolean().optional(), + + // the flags below can only be used with commercial license + // if you want to use it in the commercial usage + // please contact us for more information: hello@lobehub.com + commercial_hide_github: z.boolean().optional(), + commercial_hide_docs: z.boolean().optional(), }); export type IFeatureFlags = z.infer; @@ -61,6 +67,12 @@ export const DEFAULT_FEATURE_FLAGS: IFeatureFlags = { market: true, speech_to_text: true, + + // the flags below can only be used with commercial license + // if you want to use it in the commercial usage + // please contact us for more information: hello@lobehub.com + commercial_hide_github: false, + commercial_hide_docs: false, }; export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => { @@ -88,5 +100,8 @@ export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => { showMarket: config.market, enableSTT: config.speech_to_text, + + hideGitHub: config.commercial_hide_github, + hideDocs: config.commercial_hide_docs, }; }; diff --git a/src/config/featureFlags/utils/parser.test.ts b/src/config/featureFlags/utils/parser.test.ts index 0d791f0985b7..742c58b40a4f 100644 --- a/src/config/featureFlags/utils/parser.test.ts +++ b/src/config/featureFlags/utils/parser.test.ts @@ -24,6 +24,14 @@ describe('parseFeatureFlag', () => { }); }); + it('should hide content with commercial flags', () => { + const input = '+commercial_hide_github,+commercial_hide_docs'; + expect(parseFeatureFlag(input)).toEqual({ + commercial_hide_docs: true, + commercial_hide_github: true, + }); + }); + it('invalid flag format return nothing', () => { const input = 'invalid_format'; expect(parseFeatureFlag(input)).toEqual({}); diff --git a/src/config/modelProviders/siliconcloud.ts b/src/config/modelProviders/siliconcloud.ts index 567721bb13bf..bad0d84d0e4f 100644 --- a/src/config/modelProviders/siliconcloud.ts +++ b/src/config/modelProviders/siliconcloud.ts @@ -91,6 +91,12 @@ const SiliconCloud: ModelProviderCard = { id: 'internlm/internlm2_5-20b-chat', tokens: 32_768, }, + { + displayName: 'DeepSeek V2.5', + enabled: true, + id: 'deepseek-ai/DeepSeek-V2.5', + tokens: 32_768, + }, { displayName: 'DeepSeek V2 Chat', id: 'deepseek-ai/DeepSeek-V2-Chat', @@ -136,6 +142,11 @@ const SiliconCloud: ModelProviderCard = { id: 'meta-llama/Meta-Llama-3.1-405B-Instruct', tokens: 32_768, }, + { + displayName: 'Reflection Llama 3.1 70B', + id: 'mattshumer/Reflection-Llama-3.1-70B', + tokens: 32_768, + }, { displayName: 'Llama 3 70B', id: 'meta-llama/Meta-Llama-3-70B-Instruct', diff --git a/src/const/branding.ts b/src/const/branding.ts index 06fda118a3be..0c84e84fea21 100644 --- a/src/const/branding.ts +++ b/src/const/branding.ts @@ -1,5 +1,8 @@ -export const BRANDING_NAME = 'LobeChat'; +export const LOBE_CHAT_CLOUD = 'LobeChat Cloud'; -export const ORG_NAME = 'lobehub'; +// the code below can only be modified with commercial license +// if you want to use it in the commercial usage +// please contact us for more information: hello@lobehub.com -export const LOBE_CHAT_CLOUD = 'LobeChat Cloud'; +export const BRANDING_NAME = 'LobeChat'; +export const BRANDING_LOGO_URL = ''; diff --git a/src/const/meta.ts b/src/const/meta.ts index c0c93e125b73..40ef14f0d9c5 100644 --- a/src/const/meta.ts +++ b/src/const/meta.ts @@ -1,3 +1,4 @@ +import { BRANDING_LOGO_URL } from '@/const/branding'; import { MetaData } from '@/types/meta'; export const DEFAULT_AVATAR = '🤖'; @@ -5,4 +6,4 @@ export const DEFAULT_USER_AVATAR = '😀'; export const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)'; export const DEFAULT_AGENT_META: MetaData = {}; export const DEFAULT_INBOX_AVATAR = '🤯'; -export const DEFAULT_USER_AVATAR_URL = '/icons/icon-192x192.png'; +export const DEFAULT_USER_AVATAR_URL = BRANDING_LOGO_URL || '/icons/icon-192x192.png'; diff --git a/src/const/version.ts b/src/const/version.ts index c3ab173d7e0f..3834e4249504 100644 --- a/src/const/version.ts +++ b/src/const/version.ts @@ -1,6 +1,11 @@ import pkg from '@/../package.json'; import { getServerDBConfig } from '@/config/db'; +import { BRANDING_NAME } from './branding'; + export const CURRENT_VERSION = pkg.version; export const isServerMode = getServerDBConfig().NEXT_PUBLIC_ENABLED_SERVER_SERVICE; + +// @ts-ignore +export const isCustomBranding = BRANDING_NAME !== 'LobeChat'; diff --git a/src/features/AlertBanner/CloudBanner.tsx b/src/features/AlertBanner/CloudBanner.tsx index 82d5eb7ddaf7..ffebe4863e4c 100644 --- a/src/features/AlertBanner/CloudBanner.tsx +++ b/src/features/AlertBanner/CloudBanner.tsx @@ -11,6 +11,7 @@ import Marquee from 'react-fast-marquee'; import { useTranslation } from 'react-i18next'; import { Center, Flexbox } from 'react-layout-kit'; +import { LOBE_CHAT_CLOUD } from '@/const/branding'; import { OFFICIAL_URL, UTM_SOURCE } from '@/const/url'; import { isOnServerSide } from '@/utils/env'; @@ -57,11 +58,11 @@ const CloudBanner = memo<{ mobile?: boolean }>(({ mobile }) => { const content = ( - {t('alert.cloud.title', { name: 'LobeChat Cloud' })}: + {t('alert.cloud.title', { name: LOBE_CHAT_CLOUD })}: {t(mobile ? 'alert.cloud.descOnMobile' : 'alert.cloud.desc', { credit: new Intl.NumberFormat('en-US').format(450_000), - name: 'LobeChat Cloud', + name: LOBE_CHAT_CLOUD, })} diff --git a/src/features/ChatInput/ActionBar/Knowledge/index.tsx b/src/features/ChatInput/ActionBar/Knowledge/index.tsx index a4e2f712cdaa..b246a80f839d 100644 --- a/src/features/ChatInput/ActionBar/Knowledge/index.tsx +++ b/src/features/ChatInput/ActionBar/Knowledge/index.tsx @@ -4,6 +4,7 @@ import { Suspense, memo } from 'react'; import { useTranslation } from 'react-i18next'; import TipGuide from '@/components/TipGuide'; +import { LOBE_CHAT_CLOUD } from '@/const/branding'; import { isServerMode } from '@/const/version'; import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig'; import { useUserStore } from '@/store/user'; @@ -33,7 +34,11 @@ const Knowledge = memo(() => { disable={!enableKnowledge} icon={LibraryBig} placement={'bottom'} - title={enableKnowledge ? t('knowledgeBase.title') : t('knowledgeBase.disabled')} + title={ + enableKnowledge + ? t('knowledgeBase.title') + : t('knowledgeBase.disabled', { cloud: LOBE_CHAT_CLOUD }) + } /> ); diff --git a/src/features/Conversation/components/InboxWelcome/index.tsx b/src/features/Conversation/components/InboxWelcome/index.tsx index 42b67c46461a..c06ae75febdf 100644 --- a/src/features/Conversation/components/InboxWelcome/index.tsx +++ b/src/features/Conversation/components/InboxWelcome/index.tsx @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next'; import { Center, Flexbox } from 'react-layout-kit'; import { BRANDING_NAME } from '@/const/branding'; +import { isCustomBranding } from '@/const/version'; import { useGreeting } from '@/hooks/useGreeting'; import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig'; @@ -60,7 +61,7 @@ const InboxWelcome = memo(() => { {showWelcomeSuggest && ( <> - + {!isCustomBranding && } )} diff --git a/src/features/PWAInstall/index.tsx b/src/features/PWAInstall/index.tsx index 1ab1bbe029f2..6f9e41e1fe20 100644 --- a/src/features/PWAInstall/index.tsx +++ b/src/features/PWAInstall/index.tsx @@ -4,6 +4,7 @@ import dynamic from 'next/dynamic'; import { memo, useEffect, useLayoutEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { BRANDING_NAME } from '@/const/branding'; import { PWA_INSTALL_ID } from '@/const/layoutTokens'; import { usePWAInstall } from '@/hooks/usePWAInstall'; import { usePlatform } from '@/hooks/usePlatform'; @@ -66,7 +67,9 @@ const PWAInstall = memo(() => { }, [canInstall, hidePWAInstaller, isShowPWAGuide]); if (isPWA) return null; - return ; + return ( + + ); }); export default PWAInstall; diff --git a/src/features/Setting/Footer.tsx b/src/features/Setting/Footer.tsx index 762529643523..4fbf57c0bd20 100644 --- a/src/features/Setting/Footer.tsx +++ b/src/features/Setting/Footer.tsx @@ -12,6 +12,7 @@ import GuideModal from '@/components/GuideModal'; import GuideVideo from '@/components/GuideVideo'; import { BRANDING_NAME } from '@/const/branding'; import { GITHUB, GITHUB_ISSUES } from '@/const/url'; +import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig'; import { isOnServerSide } from '@/utils/env'; const useStyles = createStyles( @@ -26,7 +27,10 @@ const Footer = memo(() => { const [openStar, setOpenStar] = useState(false); const [openFeedback, setOpenFeedback] = useState(false); const { styles } = useStyles(); - return ( + + const { hideGitHub } = useServerConfigStore(featureFlagsSelectors); + + return hideGitHub ? null : ( <>
( return ( { const hasNewVersion = useNewVersion(); const openSettings = useOpenSettings(); const { t } = useTranslation(['common', 'setting', 'auth']); - const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors); + const { showCloudPromotion, hideDocs } = useServerConfigStore(featureFlagsSelectors); const [isLogin, isLoginWithAuth, isLoginWithClerk, openUserProfile] = useUserStore((s) => [ authSelectors.isLogin(s), authSelectors.isLoginWithAuth(s), @@ -173,63 +174,65 @@ export const useMenu = () => { }, ].filter(Boolean) as ItemType[]); - const helps: MenuProps['items'] = [ - showCloudPromotion && { - icon: , - key: 'cloud', - label: ( - - {t('userPanel.cloud', { name: 'LobeChat Cloud' })} - - ), - }, - { - icon: , - key: 'discord', - label: ( - - {t('userPanel.discord')} - - ), - }, - { - children: [ - { - icon: , - key: 'docs', + const helps: MenuProps['items'] = hideDocs + ? [] + : ([ + showCloudPromotion && { + icon: , + key: 'cloud', label: ( - - {t('userPanel.docs')} + + {t('userPanel.cloud', { name: LOBE_CHAT_CLOUD })} ), }, { - icon: , - key: 'feedback', + icon: , + key: 'discord', label: ( - - {t('userPanel.feedback')} + + {t('userPanel.discord')} ), }, { - icon: , - key: 'email', - label: ( - - {t('userPanel.email')} - - ), + children: [ + { + icon: , + key: 'docs', + label: ( + + {t('userPanel.docs')} + + ), + }, + { + icon: , + key: 'feedback', + label: ( + + {t('userPanel.feedback')} + + ), + }, + { + icon: , + key: 'email', + label: ( + + {t('userPanel.email')} + + ), + }, + ], + icon: , + key: 'help', + label: t('userPanel.help'), }, - ], - icon: , - key: 'help', - label: t('userPanel.help'), - }, - { - type: 'divider', - }, - ].filter(Boolean) as ItemType[]; + { + type: 'divider', + }, + ].filter(Boolean) as ItemType[]); const mainItems = [ { diff --git a/src/libs/agent-runtime/baichuan/index.ts b/src/libs/agent-runtime/baichuan/index.ts index 3d5f01d3e6c5..68c472646bf0 100644 --- a/src/libs/agent-runtime/baichuan/index.ts +++ b/src/libs/agent-runtime/baichuan/index.ts @@ -7,22 +7,15 @@ export const LobeBaichuanAI = LobeOpenAICompatibleFactory({ baseURL: 'https://api.baichuan-ai.com/v1', chatCompletion: { handlePayload: (payload: ChatStreamPayload) => { - const { frequency_penalty, ...rest } = payload; + const { temperature, ...rest } = payload; - let adjustedFrequencyPenalty = frequency_penalty ?? 1; - - if (frequency_penalty !== undefined) { - if (frequency_penalty < 1) { - // If less than 1 (including negative values), add 1 to bring it into the 1-2 range - adjustedFrequencyPenalty = Math.min(Math.max(frequency_penalty + 1, 1), 2); - } else if (frequency_penalty > 2) { - // If greater than 2, cap it at 2 - adjustedFrequencyPenalty = 2; - } - // If between 1 and 2, keep the original value - } - - return { ...rest, frequency_penalty: adjustedFrequencyPenalty } as OpenAI.ChatCompletionCreateParamsStreaming; + return { + ...rest, + temperature: + temperature !== undefined + ? temperature / 2 + : undefined, + } as OpenAI.ChatCompletionCreateParamsStreaming; }, }, debug: { diff --git a/src/locales/default/chat.ts b/src/locales/default/chat.ts index 979ff3aa861c..27668fba2896 100644 --- a/src/locales/default/chat.ts +++ b/src/locales/default/chat.ts @@ -45,7 +45,7 @@ export default { allFiles: '所有文件', allKnowledgeBases: '所有知识库', disabled: - '当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 LobeChat Cloud 服务', + '当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 {{cloud}} 服务', library: { action: { add: '添加', diff --git a/src/locales/default/error.ts b/src/locales/default/error.ts index f817ba122b99..db2e47184a23 100644 --- a/src/locales/default/error.ts +++ b/src/locales/default/error.ts @@ -141,7 +141,7 @@ export default { upload: { desc: '详情: {{detail}}', fileOnlySupportInServerMode: - '当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 LobeChat Cloud 服务', + '当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 {{cloud}} 服务', networkError: '请确认你的网络是否正常,并检查文件存储服务跨域配置是否正确', title: '文件上传失败,请检查网络连接或稍后再试', unknownError: '错误原因: {{reason}}', diff --git a/src/server/ld.ts b/src/server/ld.ts index ed086cbb89c4..564c2f699301 100644 --- a/src/server/ld.ts +++ b/src/server/ld.ts @@ -191,7 +191,7 @@ class Ld { '@type': 'WebSite', 'description': pkg.description, 'inLanguage': 'en-US', - 'name': 'LobeChat', + 'name': BRANDING_NAME, 'publisher': { '@id': this.getId(OFFICIAL_URL, '#organization'), }, diff --git a/src/store/file/slices/upload/action.ts b/src/store/file/slices/upload/action.ts index c2f781f73170..0353bee8f5ce 100644 --- a/src/store/file/slices/upload/action.ts +++ b/src/store/file/slices/upload/action.ts @@ -3,6 +3,7 @@ import { sha256 } from 'js-sha256'; import { StateCreator } from 'zustand/vanilla'; import { message } from '@/components/AntdStaticMethods'; +import { LOBE_CHAT_CLOUD } from '@/const/branding'; import { isServerMode } from '@/const/version'; import { fileService } from '@/services/file'; import { ServerService } from '@/services/file/server'; @@ -56,6 +57,7 @@ export const createFileUploadSlice: StateCreator< onStatusUpdate?.({ id: file.name, type: 'removeFile' }); message.info({ content: t('upload.fileOnlySupportInServerMode', { + cloud: LOBE_CHAT_CLOUD, ext: file.name.split('.').pop(), ns: 'error', }), diff --git a/src/store/serverConfig/selectors.test.ts b/src/store/serverConfig/selectors.test.ts index fcd533527973..607984dd71c1 100644 --- a/src/store/serverConfig/selectors.test.ts +++ b/src/store/serverConfig/selectors.test.ts @@ -26,6 +26,8 @@ describe('featureFlagsSelectors', () => { showLLM: false, showCloudPromotion: false, showOpenAIApiKey: true, + hideDocs: false, + hideGitHub: false, showOpenAIProxyUrl: true, enableCheckUpdates: true, showWelcomeSuggest: true,