From 761c66a8d85b7224b50f374b8ce35b205f5ce3f6 Mon Sep 17 00:00:00 2001 From: Yanyutin753 <132346501+Yanyutin753@users.noreply.github.com> Date: Mon, 6 May 2024 15:23:27 +0800 Subject: [PATCH 01/63] =?UTF-8?q?=F0=9F=A4=A9=20Added=20custom=20openai=20?= =?UTF-8?q?tts=20models=20and=20role=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apps/audio/main.py | 12 ++++++ backend/config.py | 2 + src/lib/apis/audio/index.ts | 7 +++- src/lib/apis/openai/index.ts | 5 ++- .../chat/Messages/ResponseMessage.svelte | 3 +- src/lib/components/chat/Settings/Audio.svelte | 39 ++++++++++++++++++- src/lib/i18n/locales/ar-BH/translation.json | 1 + src/lib/i18n/locales/bg-BG/translation.json | 1 + src/lib/i18n/locales/bn-BD/translation.json | 1 + src/lib/i18n/locales/ca-ES/translation.json | 1 + src/lib/i18n/locales/de-DE/translation.json | 1 + src/lib/i18n/locales/dg-DG/translation.json | 1 + src/lib/i18n/locales/en-GB/translation.json | 1 + src/lib/i18n/locales/en-US/translation.json | 1 + src/lib/i18n/locales/es-ES/translation.json | 1 + src/lib/i18n/locales/fa-IR/translation.json | 1 + src/lib/i18n/locales/fr-CA/translation.json | 1 + src/lib/i18n/locales/fr-FR/translation.json | 1 + src/lib/i18n/locales/it-IT/translation.json | 1 + src/lib/i18n/locales/ja-JP/translation.json | 1 + src/lib/i18n/locales/ka-GE/translation.json | 1 + src/lib/i18n/locales/ko-KR/translation.json | 1 + src/lib/i18n/locales/nl-NL/translation.json | 1 + src/lib/i18n/locales/pl-PL/translation.json | 1 + src/lib/i18n/locales/pt-BR/translation.json | 1 + src/lib/i18n/locales/pt-PT/translation.json | 1 + src/lib/i18n/locales/ru-RU/translation.json | 1 + src/lib/i18n/locales/sv-SE/translation.json | 1 + src/lib/i18n/locales/tr-TR/translation.json | 1 + src/lib/i18n/locales/uk-UA/translation.json | 1 + src/lib/i18n/locales/vi-VN/translation.json | 1 + src/lib/i18n/locales/zh-CN/translation.json | 1 + src/lib/i18n/locales/zh-TW/translation.json | 1 + src/lib/stores/index.ts | 1 + 34 files changed, 89 insertions(+), 7 deletions(-) diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index addaf4b76c..46ba788a82 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -43,6 +43,8 @@ from config import ( DEVICE_TYPE, AUDIO_OPENAI_API_BASE_URL, AUDIO_OPENAI_API_KEY, + AUDIO_OPENAI_API_MODEL, + AUDIO_OPENAI_API_SPEAKER ) log = logging.getLogger(__name__) @@ -60,6 +62,8 @@ app.add_middleware( app.state.OPENAI_API_BASE_URL = AUDIO_OPENAI_API_BASE_URL app.state.OPENAI_API_KEY = AUDIO_OPENAI_API_KEY +app.state.OPENAI_API_MODEL = AUDIO_OPENAI_API_MODEL +app.state.OPENAI_API_SPEAKER = AUDIO_OPENAI_API_SPEAKER # setting device type for whisper model whisper_device_type = DEVICE_TYPE if DEVICE_TYPE and DEVICE_TYPE == "cuda" else "cpu" @@ -72,6 +76,8 @@ SPEECH_CACHE_DIR.mkdir(parents=True, exist_ok=True) class OpenAIConfigUpdateForm(BaseModel): url: str key: str + model: str + speaker: str @app.get("/config") @@ -79,6 +85,8 @@ async def get_openai_config(user=Depends(get_admin_user)): return { "OPENAI_API_BASE_URL": app.state.OPENAI_API_BASE_URL, "OPENAI_API_KEY": app.state.OPENAI_API_KEY, + "OPENAI_API_MODEL": app.state.OPENAI_API_MODEL, + "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER } @@ -91,11 +99,15 @@ async def update_openai_config( app.state.OPENAI_API_BASE_URL = form_data.url app.state.OPENAI_API_KEY = form_data.key + app.state.OPENAI_API_MODEL = form_data.model + app.state.OPENAI_API_SPEAKER = form_data.speaker return { "status": True, "OPENAI_API_BASE_URL": app.state.OPENAI_API_BASE_URL, "OPENAI_API_KEY": app.state.OPENAI_API_KEY, + "OPENAI_API_MODEL": app.state.OPENAI_API_MODEL, + "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER, } diff --git a/backend/config.py b/backend/config.py index 9208a845cc..02352a0929 100644 --- a/backend/config.py +++ b/backend/config.py @@ -574,6 +574,8 @@ IMAGE_GENERATION_MODEL = os.getenv("IMAGE_GENERATION_MODEL", "") AUDIO_OPENAI_API_BASE_URL = os.getenv("AUDIO_OPENAI_API_BASE_URL", OPENAI_API_BASE_URL) AUDIO_OPENAI_API_KEY = os.getenv("AUDIO_OPENAI_API_KEY", OPENAI_API_KEY) +AUDIO_OPENAI_API_MODEL = os.getenv("AUDIO_OPENAI_API_MODEL", "tts-1") +AUDIO_OPENAI_API_SPEAKER = os.getenv("AUDIO_OPENAI_API_SPEAKER", "alloy") #################################### # LiteLLM diff --git a/src/lib/apis/audio/index.ts b/src/lib/apis/audio/index.ts index 6679420d9a..3b716d58ea 100644 --- a/src/lib/apis/audio/index.ts +++ b/src/lib/apis/audio/index.ts @@ -30,6 +30,8 @@ export const getAudioConfig = async (token: string) => { type OpenAIConfigForm = { url: string; key: string; + model: string; + speaker: string; }; export const updateAudioConfig = async (token: string, payload: OpenAIConfigForm) => { @@ -95,7 +97,8 @@ export const transcribeAudio = async (token: string, file: File) => { export const synthesizeOpenAISpeech = async ( token: string = '', speaker: string = 'alloy', - text: string = '' + text: string = '', + OpenAIModel: string = 'tts-1' ) => { let error = null; @@ -106,7 +109,7 @@ export const synthesizeOpenAISpeech = async ( 'Content-Type': 'application/json' }, body: JSON.stringify({ - model: 'tts-1', + model: OpenAIModel, input: text, voice: speaker }) diff --git a/src/lib/apis/openai/index.ts b/src/lib/apis/openai/index.ts index ac770e5b7d..d8bdac4f5e 100644 --- a/src/lib/apis/openai/index.ts +++ b/src/lib/apis/openai/index.ts @@ -239,7 +239,8 @@ export const generateOpenAIChatCompletion = async ( export const synthesizeOpenAISpeech = async ( token: string = '', speaker: string = 'alloy', - text: string = '' + text: string = '', + model: string = 'tts-1' ) => { let error = null; @@ -250,7 +251,7 @@ export const synthesizeOpenAISpeech = async ( 'Content-Type': 'application/json' }, body: JSON.stringify({ - model: 'tts-1', + model: model, input: text, voice: speaker }) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 4d87f929f3..73c56d31a8 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -223,7 +223,8 @@ const res = await synthesizeOpenAISpeech( localStorage.token, $settings?.audio?.speaker, - sentence + sentence, + $settings?.audio?.OpenAIModel ).catch((error) => { toast.error(error); diff --git a/src/lib/components/chat/Settings/Audio.svelte b/src/lib/components/chat/Settings/Audio.svelte index 71fb7957e5..a3c453a17e 100644 --- a/src/lib/components/chat/Settings/Audio.svelte +++ b/src/lib/components/chat/Settings/Audio.svelte @@ -26,6 +26,8 @@ let voices = []; let speaker = ''; + let models = []; + let OpenAIModel = ''; const getOpenAIVoices = () => { voices = [ @@ -38,6 +40,10 @@ ]; }; + const getOpenAIVoicesModel = () => { + models = [{ name: 'tts-1' }, { name: 'tts-1-hd' }]; + }; + const getWebAPIVoices = () => { const getVoicesLoop = setInterval(async () => { voices = await speechSynthesis.getVoices(); @@ -78,12 +84,16 @@ if (TTSEngine === 'openai') { const res = await updateAudioConfig(localStorage.token, { url: OpenAIUrl, - key: OpenAIKey + key: OpenAIKey, + model: OpenAIModel, + speaker: speaker, }); if (res) { OpenAIUrl = res.OPENAI_API_BASE_URL; OpenAIKey = res.OPENAI_API_KEY; + OpenAIModel = res.OPENAI_API_MODEL; + speaker = res.OPENAI_API_SPEAKER; } } }; @@ -98,9 +108,11 @@ STTEngine = settings?.audio?.STTEngine ?? ''; TTSEngine = settings?.audio?.TTSEngine ?? ''; speaker = settings?.audio?.speaker ?? ''; + OpenAIModel = settings?.audio?.OpenAIModel ?? ''; if (TTSEngine === 'openai') { getOpenAIVoices(); + getOpenAIVoicesModel(); } else { getWebAPIVoices(); } @@ -111,6 +123,8 @@ if (res) { OpenAIUrl = res.OPENAI_API_BASE_URL; OpenAIKey = res.OPENAI_API_KEY; + OpenAIModel = res.OPENAI_API_MODEL; + speaker = res.OPENAI_API_SPEAKER; } } }); @@ -126,7 +140,8 @@ audio: { STTEngine: STTEngine !== '' ? STTEngine : undefined, TTSEngine: TTSEngine !== '' ? TTSEngine : undefined, - speaker: speaker !== '' ? speaker : undefined + speaker: speaker !== '' ? speaker : undefined, + OpenAIModel: OpenAIModel !== '' ? OpenAIModel : undefined } }); dispatch('save'); @@ -215,6 +230,7 @@ if (e.target.value === 'openai') { getOpenAIVoices(); speaker = 'alloy'; + OpenAIModel = 'tts-1'; } else { getWebAPIVoices(); speaker = ''; @@ -307,6 +323,25 @@ +
+
{$i18n.t('Set Model')}
+
+
+ + + + {#each models as OpenAIMode} + +
+
+
{/if} diff --git a/src/lib/i18n/locales/ar-BH/translation.json b/src/lib/i18n/locales/ar-BH/translation.json index f259eb4262..6583e82a71 100644 --- a/src/lib/i18n/locales/ar-BH/translation.json +++ b/src/lib/i18n/locales/ar-BH/translation.json @@ -350,6 +350,7 @@ "Set Steps": "ضبط الخطوات", "Set Title Auto-Generation Model": "قم بتعيين نموذج إنشاء العنوان تلقائيًا", "Set Voice": "ضبط الصوت", + "Set Model": "ضبط النموذج", "Settings": "الاعدادات", "Settings saved successfully!": "تم حفظ الاعدادات بنجاح", "Share": "كشاركة", diff --git a/src/lib/i18n/locales/bg-BG/translation.json b/src/lib/i18n/locales/bg-BG/translation.json index 8a1d23874f..5fda2e8f48 100644 --- a/src/lib/i18n/locales/bg-BG/translation.json +++ b/src/lib/i18n/locales/bg-BG/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Задай Стъпки", "Set Title Auto-Generation Model": "Задай Модел за Автоматично Генериране на Заглавие", "Set Voice": "Задай Глас", + "Set Model": "Задай Модел", "Settings": "Настройки", "Settings saved successfully!": "Настройките са запазени успешно!", "Share": "", diff --git a/src/lib/i18n/locales/bn-BD/translation.json b/src/lib/i18n/locales/bn-BD/translation.json index d101cbfde8..059ad4c8cb 100644 --- a/src/lib/i18n/locales/bn-BD/translation.json +++ b/src/lib/i18n/locales/bn-BD/translation.json @@ -350,6 +350,7 @@ "Set Steps": "পরবর্তী ধাপসমূহ", "Set Title Auto-Generation Model": "শিরোনাম অটোজেনারেশন মডেন নির্ধারণ করুন", "Set Voice": "কন্ঠস্বর নির্ধারণ করুন", + "Set Model": "মডেল নির্ধারণ করুন", "Settings": "সেটিংসমূহ", "Settings saved successfully!": "সেটিংগুলো সফলভাবে সংরক্ষিত হয়েছে", "Share": "", diff --git a/src/lib/i18n/locales/ca-ES/translation.json b/src/lib/i18n/locales/ca-ES/translation.json index 614e466a79..4f08354763 100644 --- a/src/lib/i18n/locales/ca-ES/translation.json +++ b/src/lib/i18n/locales/ca-ES/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Estableix Passos", "Set Title Auto-Generation Model": "Estableix Model d'Auto-Generació de Títol", "Set Voice": "Estableix Veu", + "Set Model": "Estableix Model", "Settings": "Configuracions", "Settings saved successfully!": "Configuracions guardades amb èxit!", "Share": "", diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index c2afbde64b..7c252bf6ba 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Schritte festlegen", "Set Title Auto-Generation Model": "Modell für automatische Titelgenerierung festlegen", "Set Voice": "Stimme festlegen", + "Set Model": "Modell festlegen", "Settings": "Einstellungen", "Settings saved successfully!": "Einstellungen erfolgreich gespeichert!", "Share": "Teilen", diff --git a/src/lib/i18n/locales/dg-DG/translation.json b/src/lib/i18n/locales/dg-DG/translation.json index 1737ff6bd6..d8e3c6ce89 100644 --- a/src/lib/i18n/locales/dg-DG/translation.json +++ b/src/lib/i18n/locales/dg-DG/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Set Steps so many steps", "Set Title Auto-Generation Model": "Set Title Auto-Generation Model very auto-generate", "Set Voice": "Set Voice so speak", + "Set Model": "Set Model so speak", "Settings": "Settings much settings", "Settings saved successfully!": "Settings saved successfully! Very success!", "Share": "", diff --git a/src/lib/i18n/locales/en-GB/translation.json b/src/lib/i18n/locales/en-GB/translation.json index a753636de1..a4d12d9d89 100644 --- a/src/lib/i18n/locales/en-GB/translation.json +++ b/src/lib/i18n/locales/en-GB/translation.json @@ -350,6 +350,7 @@ "Set Steps": "", "Set Title Auto-Generation Model": "", "Set Voice": "", + "Set Model": "", "Settings": "", "Settings saved successfully!": "", "Share": "", diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json index a753636de1..a4d12d9d89 100644 --- a/src/lib/i18n/locales/en-US/translation.json +++ b/src/lib/i18n/locales/en-US/translation.json @@ -350,6 +350,7 @@ "Set Steps": "", "Set Title Auto-Generation Model": "", "Set Voice": "", + "Set Model": "", "Settings": "", "Settings saved successfully!": "", "Share": "", diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index 1c517cf160..ad6fb59484 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Establecer Pasos", "Set Title Auto-Generation Model": "Establecer modelo de generación automática de títulos", "Set Voice": "Establecer la voz", + "Set Model": "Establecer el modelo", "Settings": "Configuración", "Settings saved successfully!": "¡Configuración guardada exitosamente!", "Share": "", diff --git a/src/lib/i18n/locales/fa-IR/translation.json b/src/lib/i18n/locales/fa-IR/translation.json index 7986eb3ec5..9df98fb376 100644 --- a/src/lib/i18n/locales/fa-IR/translation.json +++ b/src/lib/i18n/locales/fa-IR/translation.json @@ -350,6 +350,7 @@ "Set Steps": "تنظیم گام\u200cها", "Set Title Auto-Generation Model": "تنظیم مدل تولید خودکار عنوان", "Set Voice": "تنظیم صدا", + "Set Model": "تنظیم مدل", "Settings": "تنظیمات", "Settings saved successfully!": "تنظیمات با موفقیت ذخیره شد!", "Share": "", diff --git a/src/lib/i18n/locales/fr-CA/translation.json b/src/lib/i18n/locales/fr-CA/translation.json index fb9a7b2c5f..88f0f01b16 100644 --- a/src/lib/i18n/locales/fr-CA/translation.json +++ b/src/lib/i18n/locales/fr-CA/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Définir les étapes", "Set Title Auto-Generation Model": "Définir le modèle de génération automatique de titre", "Set Voice": "Définir la voix", + "Set Model": "Configurer le modèle", "Settings": "Paramètres", "Settings saved successfully!": "Paramètres enregistrés avec succès !", "Share": "", diff --git a/src/lib/i18n/locales/fr-FR/translation.json b/src/lib/i18n/locales/fr-FR/translation.json index 3161136b82..6965cc76df 100644 --- a/src/lib/i18n/locales/fr-FR/translation.json +++ b/src/lib/i18n/locales/fr-FR/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Définir les étapes", "Set Title Auto-Generation Model": "Définir le modèle de génération automatique de titre", "Set Voice": "Définir la voix", + "Set Model": "Définir le modèle", "Settings": "Paramètres", "Settings saved successfully!": "Paramètres enregistrés avec succès !", "Share": "", diff --git a/src/lib/i18n/locales/it-IT/translation.json b/src/lib/i18n/locales/it-IT/translation.json index 524bef3df8..ed21ea72ab 100644 --- a/src/lib/i18n/locales/it-IT/translation.json +++ b/src/lib/i18n/locales/it-IT/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Imposta passaggi", "Set Title Auto-Generation Model": "Imposta modello di generazione automatica del titolo", "Set Voice": "Imposta voce", + "Set Model": "Imposta modello", "Settings": "Impostazioni", "Settings saved successfully!": "Impostazioni salvate con successo!", "Share": "", diff --git a/src/lib/i18n/locales/ja-JP/translation.json b/src/lib/i18n/locales/ja-JP/translation.json index eee01ac3cb..4006dd11c8 100644 --- a/src/lib/i18n/locales/ja-JP/translation.json +++ b/src/lib/i18n/locales/ja-JP/translation.json @@ -350,6 +350,7 @@ "Set Steps": "ステップを設定", "Set Title Auto-Generation Model": "タイトル自動生成モデルを設定", "Set Voice": "音声を設定", + "Set Model": "モデルを設定", "Settings": "設定", "Settings saved successfully!": "設定が正常に保存されました!", "Share": "", diff --git a/src/lib/i18n/locales/ka-GE/translation.json b/src/lib/i18n/locales/ka-GE/translation.json index e76c311206..99ed2110d4 100644 --- a/src/lib/i18n/locales/ka-GE/translation.json +++ b/src/lib/i18n/locales/ka-GE/translation.json @@ -350,6 +350,7 @@ "Set Steps": "ნაბიჯების დაყენება", "Set Title Auto-Generation Model": "სათაურის ავტომატური გენერაციის მოდელის დაყენება", "Set Voice": "ხმის დაყენება", + "Set Model": "მოდელის დაყენება", "Settings": "ხელსაწყოები", "Settings saved successfully!": "პარამეტრები წარმატებით განახლდა!", "Share": "", diff --git a/src/lib/i18n/locales/ko-KR/translation.json b/src/lib/i18n/locales/ko-KR/translation.json index 7ad3d6d1d3..941e80d0bf 100644 --- a/src/lib/i18n/locales/ko-KR/translation.json +++ b/src/lib/i18n/locales/ko-KR/translation.json @@ -350,6 +350,7 @@ "Set Steps": "단계 설정", "Set Title Auto-Generation Model": "제목 자동 생성 모델 설정", "Set Voice": "음성 설정", + "Set Model": "모델 설정", "Settings": "설정", "Settings saved successfully!": "설정이 성공적으로 저장되었습니다!", "Share": "", diff --git a/src/lib/i18n/locales/nl-NL/translation.json b/src/lib/i18n/locales/nl-NL/translation.json index 5a02364536..689b9154e9 100644 --- a/src/lib/i18n/locales/nl-NL/translation.json +++ b/src/lib/i18n/locales/nl-NL/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Stel Stappen in", "Set Title Auto-Generation Model": "Stel Titel Auto-Generatie Model in", "Set Voice": "Stel Stem in", + "Set Model": "Stel die model op", "Settings": "Instellingen", "Settings saved successfully!": "Instellingen succesvol opgeslagen!", "Share": "", diff --git a/src/lib/i18n/locales/pl-PL/translation.json b/src/lib/i18n/locales/pl-PL/translation.json index c212b1520b..9f306f8dec 100644 --- a/src/lib/i18n/locales/pl-PL/translation.json +++ b/src/lib/i18n/locales/pl-PL/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Ustaw kroki", "Set Title Auto-Generation Model": "Ustaw model automatycznego generowania tytułów", "Set Voice": "Ustaw głos", + "Set Model": "Ustaw model", "Settings": "Ustawienia", "Settings saved successfully!": "Ustawienia zapisane pomyślnie!", "Share": "", diff --git a/src/lib/i18n/locales/pt-BR/translation.json b/src/lib/i18n/locales/pt-BR/translation.json index c1c5cce65d..77e4dd3938 100644 --- a/src/lib/i18n/locales/pt-BR/translation.json +++ b/src/lib/i18n/locales/pt-BR/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Definir Etapas", "Set Title Auto-Generation Model": "Definir Modelo de Geração Automática de Título", "Set Voice": "Definir Voz", + "Set Model": "Definir Modelo", "Settings": "Configurações", "Settings saved successfully!": "Configurações salvas com sucesso!", "Share": "", diff --git a/src/lib/i18n/locales/pt-PT/translation.json b/src/lib/i18n/locales/pt-PT/translation.json index 7a18ebd277..834d27e479 100644 --- a/src/lib/i18n/locales/pt-PT/translation.json +++ b/src/lib/i18n/locales/pt-PT/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Definir Etapas", "Set Title Auto-Generation Model": "Definir Modelo de Geração Automática de Título", "Set Voice": "Definir Voz", + "Set Model": "Definir Modelo", "Settings": "Configurações", "Settings saved successfully!": "Configurações salvas com sucesso!", "Share": "", diff --git a/src/lib/i18n/locales/ru-RU/translation.json b/src/lib/i18n/locales/ru-RU/translation.json index 724fc2d1ef..98705a695a 100644 --- a/src/lib/i18n/locales/ru-RU/translation.json +++ b/src/lib/i18n/locales/ru-RU/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Установить шаги", "Set Title Auto-Generation Model": "Установить модель автогенерации заголовков", "Set Voice": "Установить голос", + "Set Model": "Установить модель", "Settings": "Настройки", "Settings saved successfully!": "Настройки успешно сохранены!", "Share": "", diff --git a/src/lib/i18n/locales/sv-SE/translation.json b/src/lib/i18n/locales/sv-SE/translation.json index c302b90685..17dd0a0304 100644 --- a/src/lib/i18n/locales/sv-SE/translation.json +++ b/src/lib/i18n/locales/sv-SE/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Ange steg", "Set Title Auto-Generation Model": "Ange modell för automatisk generering av titel", "Set Voice": "Ange röst", + "Set Model": "Ställ in modell", "Settings": "Inställningar", "Settings saved successfully!": "Inställningar sparades framgångsrikt!", "Share": "", diff --git a/src/lib/i18n/locales/tr-TR/translation.json b/src/lib/i18n/locales/tr-TR/translation.json index 04fed40720..9de595f17b 100644 --- a/src/lib/i18n/locales/tr-TR/translation.json +++ b/src/lib/i18n/locales/tr-TR/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Adımları Ayarla", "Set Title Auto-Generation Model": "Otomatik Başlık Oluşturma Modelini Ayarla", "Set Voice": "Ses Ayarla", + "Set Model": "Model Ayarla", "Settings": "Ayarlar", "Settings saved successfully!": "Ayarlar başarıyla kaydedildi!", "Share": "Paylaş", diff --git a/src/lib/i18n/locales/uk-UA/translation.json b/src/lib/i18n/locales/uk-UA/translation.json index 1dde07072b..637614d8c9 100644 --- a/src/lib/i18n/locales/uk-UA/translation.json +++ b/src/lib/i18n/locales/uk-UA/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Встановити кроки", "Set Title Auto-Generation Model": "Встановити модель автогенерації заголовків", "Set Voice": "Встановити голос", + "Set Model": "Встановити модель", "Settings": "Налаштування", "Settings saved successfully!": "Налаштування успішно збережено!", "Share": "", diff --git a/src/lib/i18n/locales/vi-VN/translation.json b/src/lib/i18n/locales/vi-VN/translation.json index d8a7ccf96a..7096f65c93 100644 --- a/src/lib/i18n/locales/vi-VN/translation.json +++ b/src/lib/i18n/locales/vi-VN/translation.json @@ -350,6 +350,7 @@ "Set Steps": "Đặt Số Bước", "Set Title Auto-Generation Model": "Đặt tiêu đề tự động", "Set Voice": "Đặt Giọng nói", + "Set Model": "Thiết lập mô hình", "Settings": "Cài đặt", "Settings saved successfully!": "Cài đặt đã được lưu thành công!", "Share": "", diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index fe7ec77ffc..6c9492ee47 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -350,6 +350,7 @@ "Set Steps": "设置步骤", "Set Title Auto-Generation Model": "设置标题自动生成模型", "Set Voice": "设置声音", + "Set Model": "设置模型", "Settings": "设置", "Settings saved successfully!": "设置已保存", "Share": "", diff --git a/src/lib/i18n/locales/zh-TW/translation.json b/src/lib/i18n/locales/zh-TW/translation.json index 3edde3b95c..d71ddd8c02 100644 --- a/src/lib/i18n/locales/zh-TW/translation.json +++ b/src/lib/i18n/locales/zh-TW/translation.json @@ -350,6 +350,7 @@ "Set Steps": "設定步數", "Set Title Auto-Generation Model": "設定自動生成標題用模型", "Set Voice": "設定語音", + "Set Model": "設定模型", "Settings": "設定", "Settings saved successfully!": "成功儲存設定", "Share": "", diff --git a/src/lib/stores/index.ts b/src/lib/stores/index.ts index 967cfdad57..32c738ae3f 100644 --- a/src/lib/stores/index.ts +++ b/src/lib/stores/index.ts @@ -102,6 +102,7 @@ type AudioSettings = { STTEngine?: string; TTSEngine?: string; speaker?: string; + OpenAIModel?: string; }; type TitleSettings = { From 5f7188b4804d713161cf772a20ecfb459040392e Mon Sep 17 00:00:00 2001 From: Yanyutin753 <132346501+Yanyutin753@users.noreply.github.com> Date: Mon, 6 May 2024 15:33:29 +0800 Subject: [PATCH 02/63] fix python test --- backend/apps/audio/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index 46ba788a82..be605388cf 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -44,7 +44,7 @@ from config import ( AUDIO_OPENAI_API_BASE_URL, AUDIO_OPENAI_API_KEY, AUDIO_OPENAI_API_MODEL, - AUDIO_OPENAI_API_SPEAKER + AUDIO_OPENAI_API_SPEAKER, ) log = logging.getLogger(__name__) @@ -86,7 +86,7 @@ async def get_openai_config(user=Depends(get_admin_user)): "OPENAI_API_BASE_URL": app.state.OPENAI_API_BASE_URL, "OPENAI_API_KEY": app.state.OPENAI_API_KEY, "OPENAI_API_MODEL": app.state.OPENAI_API_MODEL, - "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER + "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER, } From 7f617225a0e78109486763af2d5a2b568295261e Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 16:29:57 -0700 Subject: [PATCH 03/63] refac: styling --- src/lib/components/ChangelogModal.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/components/ChangelogModal.svelte b/src/lib/components/ChangelogModal.svelte index 1113b25e45..70b18dc5ed 100644 --- a/src/lib/components/ChangelogModal.svelte +++ b/src/lib/components/ChangelogModal.svelte @@ -22,7 +22,7 @@ -
+
{$i18n.t('What’s New in')} @@ -57,10 +57,8 @@
-
-
-
+
{#if changelog} {#each Object.keys(changelog) as version} From 9aa689ea56ecacbcc1e66ed41f2b08d4a1c6eb01 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 16:59:54 -0700 Subject: [PATCH 04/63] feat: title trim quotation marks --- src/lib/apis/ollama/index.ts | 2 +- src/lib/apis/openai/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/apis/ollama/index.ts b/src/lib/apis/ollama/index.ts index b28d060718..7ecd65efee 100644 --- a/src/lib/apis/ollama/index.ts +++ b/src/lib/apis/ollama/index.ts @@ -182,7 +182,7 @@ export const generateTitle = async ( throw error; } - return res?.response ?? 'New Chat'; + return res?.response.replace(/["']/g, '') ?? 'New Chat'; }; export const generatePrompt = async (token: string = '', model: string, conversation: string) => { diff --git a/src/lib/apis/openai/index.ts b/src/lib/apis/openai/index.ts index 944e2d40dc..e571734454 100644 --- a/src/lib/apis/openai/index.ts +++ b/src/lib/apis/openai/index.ts @@ -316,5 +316,5 @@ export const generateTitle = async ( throw error; } - return res?.choices[0]?.message?.content ?? 'New Chat'; + return res?.choices[0]?.message?.content.replace(/["']/g, '') ?? 'New Chat'; }; From 9b5903938813f3e706e6a88c7717bbaa0843c467 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 17:00:50 -0700 Subject: [PATCH 05/63] refac: styling --- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 6d027ab292..2d25eb61c4 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -470,7 +470,7 @@ } --> {#if message.citations} -
+
{#each message.citations.reduce((acc, citation) => { citation.document.forEach((document, index) => { From 66e7e577dfaf422baf5e18457bc59f09ccfa9607 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 17:02:04 -0700 Subject: [PATCH 06/63] refac: citation styling --- src/lib/components/chat/Messages/ResponseMessage.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 2d25eb61c4..9776abb94c 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -470,8 +470,8 @@ } --> {#if message.citations} -
-
+
+
{#each message.citations.reduce((acc, citation) => { citation.document.forEach((document, index) => { const metadata = citation.metadata?.[index]; From 5d6517c537338723d360461768c61010c836de72 Mon Sep 17 00:00:00 2001 From: Yanyutin753 <132346501+Yanyutin753@users.noreply.github.com> Date: Tue, 7 May 2024 08:28:34 +0800 Subject: [PATCH 07/63] update the name --- backend/apps/audio/main.py | 10 +++---- backend/config.py | 2 +- src/lib/apis/audio/index.ts | 4 +-- .../chat/Messages/ResponseMessage.svelte | 2 +- src/lib/components/chat/Settings/Audio.svelte | 26 +++++++++---------- src/lib/stores/index.ts | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index be605388cf..87732d7bc6 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -44,7 +44,7 @@ from config import ( AUDIO_OPENAI_API_BASE_URL, AUDIO_OPENAI_API_KEY, AUDIO_OPENAI_API_MODEL, - AUDIO_OPENAI_API_SPEAKER, + AUDIO_OPENAI_API_VOICE, ) log = logging.getLogger(__name__) @@ -63,7 +63,7 @@ app.add_middleware( app.state.OPENAI_API_BASE_URL = AUDIO_OPENAI_API_BASE_URL app.state.OPENAI_API_KEY = AUDIO_OPENAI_API_KEY app.state.OPENAI_API_MODEL = AUDIO_OPENAI_API_MODEL -app.state.OPENAI_API_SPEAKER = AUDIO_OPENAI_API_SPEAKER +app.state.OPENAI_API_VOICE = AUDIO_OPENAI_API_VOICE # setting device type for whisper model whisper_device_type = DEVICE_TYPE if DEVICE_TYPE and DEVICE_TYPE == "cuda" else "cpu" @@ -86,7 +86,7 @@ async def get_openai_config(user=Depends(get_admin_user)): "OPENAI_API_BASE_URL": app.state.OPENAI_API_BASE_URL, "OPENAI_API_KEY": app.state.OPENAI_API_KEY, "OPENAI_API_MODEL": app.state.OPENAI_API_MODEL, - "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER, + "OPENAI_API_VOICE": app.state.OPENAI_API_VOICE, } @@ -100,14 +100,14 @@ async def update_openai_config( app.state.OPENAI_API_BASE_URL = form_data.url app.state.OPENAI_API_KEY = form_data.key app.state.OPENAI_API_MODEL = form_data.model - app.state.OPENAI_API_SPEAKER = form_data.speaker + app.state.OPENAI_API_VOICE = form_data.speaker return { "status": True, "OPENAI_API_BASE_URL": app.state.OPENAI_API_BASE_URL, "OPENAI_API_KEY": app.state.OPENAI_API_KEY, "OPENAI_API_MODEL": app.state.OPENAI_API_MODEL, - "OPENAI_API_SPEAKER": app.state.OPENAI_API_SPEAKER, + "OPENAI_API_VOICE": app.state.OPENAI_API_VOICE, } diff --git a/backend/config.py b/backend/config.py index 02352a0929..a6dc83ffa4 100644 --- a/backend/config.py +++ b/backend/config.py @@ -575,7 +575,7 @@ IMAGE_GENERATION_MODEL = os.getenv("IMAGE_GENERATION_MODEL", "") AUDIO_OPENAI_API_BASE_URL = os.getenv("AUDIO_OPENAI_API_BASE_URL", OPENAI_API_BASE_URL) AUDIO_OPENAI_API_KEY = os.getenv("AUDIO_OPENAI_API_KEY", OPENAI_API_KEY) AUDIO_OPENAI_API_MODEL = os.getenv("AUDIO_OPENAI_API_MODEL", "tts-1") -AUDIO_OPENAI_API_SPEAKER = os.getenv("AUDIO_OPENAI_API_SPEAKER", "alloy") +AUDIO_OPENAI_API_VOICE = os.getenv("AUDIO_OPENAI_API_VOICE", "alloy") #################################### # LiteLLM diff --git a/src/lib/apis/audio/index.ts b/src/lib/apis/audio/index.ts index 3b716d58ea..7bd8981fec 100644 --- a/src/lib/apis/audio/index.ts +++ b/src/lib/apis/audio/index.ts @@ -98,7 +98,7 @@ export const synthesizeOpenAISpeech = async ( token: string = '', speaker: string = 'alloy', text: string = '', - OpenAIModel: string = 'tts-1' + model: string = 'tts-1' ) => { let error = null; @@ -109,7 +109,7 @@ export const synthesizeOpenAISpeech = async ( 'Content-Type': 'application/json' }, body: JSON.stringify({ - model: OpenAIModel, + model: model, input: text, voice: speaker }) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 73c56d31a8..67b6e3a344 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -224,7 +224,7 @@ localStorage.token, $settings?.audio?.speaker, sentence, - $settings?.audio?.OpenAIModel + $settings?.audio?.model ).catch((error) => { toast.error(error); diff --git a/src/lib/components/chat/Settings/Audio.svelte b/src/lib/components/chat/Settings/Audio.svelte index a3c453a17e..a7b8ec11a6 100644 --- a/src/lib/components/chat/Settings/Audio.svelte +++ b/src/lib/components/chat/Settings/Audio.svelte @@ -27,7 +27,7 @@ let voices = []; let speaker = ''; let models = []; - let OpenAIModel = ''; + let model = ''; const getOpenAIVoices = () => { voices = [ @@ -85,15 +85,15 @@ const res = await updateAudioConfig(localStorage.token, { url: OpenAIUrl, key: OpenAIKey, - model: OpenAIModel, - speaker: speaker, + model: model, + speaker: speaker }); if (res) { OpenAIUrl = res.OPENAI_API_BASE_URL; OpenAIKey = res.OPENAI_API_KEY; - OpenAIModel = res.OPENAI_API_MODEL; - speaker = res.OPENAI_API_SPEAKER; + model = res.OPENAI_API_MODEL; + speaker = res.OPENAI_API_VOICE; } } }; @@ -108,7 +108,7 @@ STTEngine = settings?.audio?.STTEngine ?? ''; TTSEngine = settings?.audio?.TTSEngine ?? ''; speaker = settings?.audio?.speaker ?? ''; - OpenAIModel = settings?.audio?.OpenAIModel ?? ''; + model = settings?.audio?.model ?? ''; if (TTSEngine === 'openai') { getOpenAIVoices(); @@ -123,8 +123,8 @@ if (res) { OpenAIUrl = res.OPENAI_API_BASE_URL; OpenAIKey = res.OPENAI_API_KEY; - OpenAIModel = res.OPENAI_API_MODEL; - speaker = res.OPENAI_API_SPEAKER; + model = res.OPENAI_API_MODEL; + speaker = res.OPENAI_API_VOICE; } } }); @@ -141,7 +141,7 @@ STTEngine: STTEngine !== '' ? STTEngine : undefined, TTSEngine: TTSEngine !== '' ? TTSEngine : undefined, speaker: speaker !== '' ? speaker : undefined, - OpenAIModel: OpenAIModel !== '' ? OpenAIModel : undefined + model: model !== '' ? model : undefined } }); dispatch('save'); @@ -230,7 +230,7 @@ if (e.target.value === 'openai') { getOpenAIVoices(); speaker = 'alloy'; - OpenAIModel = 'tts-1'; + model = 'tts-1'; } else { getWebAPIVoices(); speaker = ''; @@ -330,13 +330,13 @@ - {#each models as OpenAIMode} -
diff --git a/src/lib/stores/index.ts b/src/lib/stores/index.ts index 32c738ae3f..c4ccb5eec7 100644 --- a/src/lib/stores/index.ts +++ b/src/lib/stores/index.ts @@ -102,7 +102,7 @@ type AudioSettings = { STTEngine?: string; TTSEngine?: string; speaker?: string; - OpenAIModel?: string; + model?: string; }; type TitleSettings = { From f58eb0d26640c144c84a4fe1f72abcd819e035f2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 17:29:16 -0700 Subject: [PATCH 08/63] feat: browser search engine support --- backend/config.py | 3 +++ backend/main.py | 18 +++++++++++++++++- src/app.html | 6 ++++++ src/routes/(app)/+page.svelte | 8 ++++++++ static/opensearch.xml | 8 ++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 static/opensearch.xml diff --git a/backend/config.py b/backend/config.py index fe8260a507..cdc10ec456 100644 --- a/backend/config.py +++ b/backend/config.py @@ -76,8 +76,11 @@ WEBUI_NAME = os.environ.get("WEBUI_NAME", "Open WebUI") if WEBUI_NAME != "Open WebUI": WEBUI_NAME += " (Open WebUI)" +WEBUI_URL = os.environ.get("WEBUI_URL", "http://localhost:3000") + WEBUI_FAVICON_URL = "https://openwebui.com/favicon.png" + #################################### # ENV (dev,test,prod) #################################### diff --git a/backend/main.py b/backend/main.py index dc2175ad55..3306441915 100644 --- a/backend/main.py +++ b/backend/main.py @@ -15,7 +15,7 @@ from fastapi.middleware.wsgi import WSGIMiddleware from fastapi.middleware.cors import CORSMiddleware from starlette.exceptions import HTTPException as StarletteHTTPException from starlette.middleware.base import BaseHTTPMiddleware -from starlette.responses import StreamingResponse +from starlette.responses import StreamingResponse, Response from apps.ollama.main import app as ollama_app from apps.openai.main import app as openai_app @@ -43,6 +43,7 @@ from apps.rag.utils import rag_messages from config import ( CONFIG_DATA, WEBUI_NAME, + WEBUI_URL, ENV, VERSION, CHANGELOG, @@ -350,6 +351,21 @@ async def get_manifest_json(): } +@app.get("/opensearch.xml") +async def get_opensearch_xml(): + xml_content = rf""" + + {WEBUI_NAME} + Search {WEBUI_NAME} + UTF-8 + {WEBUI_URL}/favicon.png + + {WEBUI_URL} + + """ + return Response(content=xml_content, media_type="application/xml") + + app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static") app.mount("/cache", StaticFiles(directory=CACHE_DIR), name="cache") diff --git a/src/app.html b/src/app.html index 1aa01e8b67..1616cc668d 100644 --- a/src/app.html +++ b/src/app.html @@ -6,6 +6,12 @@ + {#if show} From bfb8b087232594d27d38983d597e979f94ca90e3 Mon Sep 17 00:00:00 2001 From: "0xThresh.eth" <0xthresh@protonmail.com> Date: Mon, 6 May 2024 20:39:10 -0600 Subject: [PATCH 12/63] Remove Helm charts, which have moved to a separate repo --- kubernetes/helm/.helmignore | 1 - kubernetes/helm/Chart.yaml | 21 ---- kubernetes/helm/README.md | 4 + kubernetes/helm/templates/_helpers.tpl | 51 ---------- kubernetes/helm/templates/ollama-service.yaml | 23 ----- .../helm/templates/ollama-statefulset.yaml | 98 ------------------- .../helm/templates/webui-deployment.yaml | 62 ------------ kubernetes/helm/templates/webui-ingress.yaml | 33 ------- kubernetes/helm/templates/webui-pvc.yaml | 27 ----- kubernetes/helm/templates/webui-service.yaml | 29 ------ kubernetes/helm/values-minikube.yaml | 27 ----- kubernetes/helm/values.yaml | 75 -------------- 12 files changed, 4 insertions(+), 447 deletions(-) delete mode 100644 kubernetes/helm/.helmignore delete mode 100644 kubernetes/helm/Chart.yaml create mode 100644 kubernetes/helm/README.md delete mode 100644 kubernetes/helm/templates/_helpers.tpl delete mode 100644 kubernetes/helm/templates/ollama-service.yaml delete mode 100644 kubernetes/helm/templates/ollama-statefulset.yaml delete mode 100644 kubernetes/helm/templates/webui-deployment.yaml delete mode 100644 kubernetes/helm/templates/webui-ingress.yaml delete mode 100644 kubernetes/helm/templates/webui-pvc.yaml delete mode 100644 kubernetes/helm/templates/webui-service.yaml delete mode 100644 kubernetes/helm/values-minikube.yaml delete mode 100644 kubernetes/helm/values.yaml diff --git a/kubernetes/helm/.helmignore b/kubernetes/helm/.helmignore deleted file mode 100644 index e8065247a0..0000000000 --- a/kubernetes/helm/.helmignore +++ /dev/null @@ -1 +0,0 @@ -values-minikube.yaml diff --git a/kubernetes/helm/Chart.yaml b/kubernetes/helm/Chart.yaml deleted file mode 100644 index ab5b41df60..0000000000 --- a/kubernetes/helm/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: open-webui -version: 1.0.0 -appVersion: "latest" - -home: https://www.openwebui.com/ -icon: https://raw.githubusercontent.com/open-webui/open-webui/main/static/favicon.png - -description: "Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋" -keywords: -- llm -- chat -- web-ui - -sources: -- https://github.com/open-webui/open-webui/tree/main/kubernetes/helm -- https://hub.docker.com/r/ollama/ollama -- https://github.com/open-webui/open-webui/pkgs/container/open-webui - -annotations: - licenses: MIT diff --git a/kubernetes/helm/README.md b/kubernetes/helm/README.md new file mode 100644 index 0000000000..5737007d96 --- /dev/null +++ b/kubernetes/helm/README.md @@ -0,0 +1,4 @@ +# Helm Charts +Open WebUI Helm Charts are now hosted in a separate repo, which can be found here: https://github.com/open-webui/helm-charts + +The charts are released at https://helm.openwebui.com. \ No newline at end of file diff --git a/kubernetes/helm/templates/_helpers.tpl b/kubernetes/helm/templates/_helpers.tpl deleted file mode 100644 index 6233efab2d..0000000000 --- a/kubernetes/helm/templates/_helpers.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{- define "open-webui.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end -}} - -{{- define "ollama.name" -}} -ollama -{{- end -}} - -{{- define "ollama.url" -}} -{{- if .Values.ollama.externalHost }} -{{- printf .Values.ollama.externalHost }} -{{- else }} -{{- printf "http://%s.%s.svc.cluster.local:%d" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }} -{{- end }} -{{- end }} - -{{- define "chart.name" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{- define "base.labels" -}} -helm.sh/chart: {{ include "chart.name" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{- define "base.selectorLabels" -}} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "open-webui.selectorLabels" -}} -{{ include "base.selectorLabels" . }} -app.kubernetes.io/component: {{ .Chart.Name }} -{{- end }} - -{{- define "open-webui.labels" -}} -{{ include "base.labels" . }} -{{ include "open-webui.selectorLabels" . }} -{{- end }} - -{{- define "ollama.selectorLabels" -}} -{{ include "base.selectorLabels" . }} -app.kubernetes.io/component: {{ include "ollama.name" . }} -{{- end }} - -{{- define "ollama.labels" -}} -{{ include "base.labels" . }} -{{ include "ollama.selectorLabels" . }} -{{- end }} diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml deleted file mode 100644 index 32c93caec2..0000000000 --- a/kubernetes/helm/templates/ollama-service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if not .Values.ollama.externalHost }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "ollama.name" . }} - labels: - {{- include "ollama.labels" . | nindent 4 }} - {{- with .Values.ollama.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - {{- include "ollama.selectorLabels" . | nindent 4 }} -{{- with .Values.ollama.service }} - type: {{ .type }} - ports: - - protocol: TCP - name: http - port: {{ .port }} - targetPort: http -{{- end }} -{{- end }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml deleted file mode 100644 index 2750956ab2..0000000000 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ /dev/null @@ -1,98 +0,0 @@ -{{- if not .Values.ollama.externalHost }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "ollama.name" . }} - labels: - {{- include "ollama.labels" . | nindent 4 }} - {{- with .Values.ollama.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - serviceName: {{ include "ollama.name" . }} - replicas: {{ .Values.ollama.replicaCount }} - selector: - matchLabels: - {{- include "ollama.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "ollama.labels" . | nindent 8 }} - {{- with .Values.ollama.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - enableServiceLinks: false - automountServiceAccountToken: false - {{- with .Values.ollama.runtimeClassName }} - runtimeClassName: {{ . }} - {{- end }} - containers: - - name: {{ include "ollama.name" . }} - {{- with .Values.ollama.image }} - image: {{ .repository }}:{{ .tag }} - imagePullPolicy: {{ .pullPolicy }} - {{- end }} - tty: true - ports: - - name: http - containerPort: {{ .Values.ollama.service.containerPort }} - env: - {{- if .Values.ollama.gpu.enabled }} - - name: PATH - value: /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - - name: LD_LIBRARY_PATH - value: /usr/local/nvidia/lib:/usr/local/nvidia/lib64 - - name: NVIDIA_DRIVER_CAPABILITIES - value: compute,utility - {{- end }} - {{- with .Values.ollama.resources }} - resources: {{- toYaml . | nindent 10 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /root/.ollama - {{- with .Values.ollama.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ollama.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - {{- if and .Values.ollama.persistence.enabled .Values.ollama.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.ollama.persistence.existingClaim }} - {{- else if not .Values.ollama.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if and .Values.ollama.persistence.enabled (not .Values.ollama.persistence.existingClaim) }} - [] - volumeClaimTemplates: - - metadata: - name: data - labels: - {{- include "ollama.selectorLabels" . | nindent 8 }} - {{- with .Values.ollama.persistence.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - accessModes: - {{- range .Values.ollama.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.ollama.persistence.size | quote }} - storageClassName: {{ .Values.ollama.persistence.storageClass }} - {{- with .Values.ollama.persistence.selector }} - selector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml deleted file mode 100644 index bbd5706dea..0000000000 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.webui.replicaCount }} - selector: - matchLabels: - {{- include "open-webui.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "open-webui.labels" . | nindent 8 }} - {{- with .Values.webui.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - enableServiceLinks: false - automountServiceAccountToken: false - containers: - - name: {{ .Chart.Name }} - {{- with .Values.webui.image }} - image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }} - imagePullPolicy: {{ .pullPolicy }} - {{- end }} - ports: - - name: http - containerPort: {{ .Values.webui.service.containerPort }} - {{- with .Values.webui.resources }} - resources: {{- toYaml . | nindent 10 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /app/backend/data - env: - - name: OLLAMA_BASE_URL - value: {{ include "ollama.url" . | quote }} - tty: true - {{- with .Values.webui.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - {{- if and .Values.webui.persistence.enabled .Values.webui.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.webui.persistence.existingClaim }} - {{- else if not .Values.webui.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }} - - name: data - persistentVolumeClaim: - claimName: {{ include "open-webui.name" . }} - {{- end }} diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml deleted file mode 100644 index ea9f95e166..0000000000 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.webui.ingress.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .Values.webui.ingress.class }} - ingressClassName: {{ . }} - {{- end }} - {{- if .Values.webui.ingress.tls }} - tls: - - hosts: - - {{ .Values.webui.ingress.host | quote }} - secretName: {{ default (printf "%s-tls" .Release.Name) .Values.webui.ingress.existingSecret }} - {{- end }} - rules: - - host: {{ .Values.webui.ingress.host }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: {{ include "open-webui.name" . }} - port: - name: http -{{- end }} diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml deleted file mode 100644 index 8783324580..0000000000 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.selectorLabels" . | nindent 4 }} - {{- with .Values.webui.persistence.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} -spec: - accessModes: - {{- range .Values.webui.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.webui.persistence.size }} - {{- if .Values.webui.persistence.storageClass }} - storageClassName: {{ .Values.webui.persistence.storageClass }} - {{- end }} - {{- with .Values.webui.persistence.selector }} - selector: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml deleted file mode 100644 index 9ccd9b9e99..0000000000 --- a/kubernetes/helm/templates/webui-service.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.webui.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - {{- include "open-webui.selectorLabels" . | nindent 4 }} - type: {{ .Values.webui.service.type | default "ClusterIP" }} - ports: - - protocol: TCP - name: http - port: {{ .Values.webui.service.port }} - targetPort: http - {{- if .Values.webui.service.nodePort }} - nodePort: {{ .Values.webui.service.nodePort | int }} - {{- end }} - {{- if .Values.webui.service.loadBalancerClass }} - loadBalancerClass: {{ .Values.webui.service.loadBalancerClass | quote }} - {{- end }} - diff --git a/kubernetes/helm/values-minikube.yaml b/kubernetes/helm/values-minikube.yaml deleted file mode 100644 index 1b67b0b7c7..0000000000 --- a/kubernetes/helm/values-minikube.yaml +++ /dev/null @@ -1,27 +0,0 @@ -ollama: - resources: - requests: - cpu: "2000m" - memory: "2Gi" - limits: - cpu: "4000m" - memory: "4Gi" - nvidia.com/gpu: "0" - service: - type: ClusterIP - gpu: - enabled: false - -webui: - resources: - requests: - cpu: "500m" - memory: "500Mi" - limits: - cpu: "1000m" - memory: "1Gi" - ingress: - enabled: true - host: open-webui.minikube.local - service: - type: NodePort diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml deleted file mode 100644 index 4437973e00..0000000000 --- a/kubernetes/helm/values.yaml +++ /dev/null @@ -1,75 +0,0 @@ -nameOverride: "" - -ollama: - externalHost: "" - annotations: {} - podAnnotations: {} - replicaCount: 1 - image: - repository: ollama/ollama - tag: latest - pullPolicy: Always - resources: {} - persistence: - enabled: true - size: 30Gi - existingClaim: "" - accessModes: - - ReadWriteOnce - storageClass: "" - selector: {} - annotations: {} - nodeSelector: {} - # -- If using a special runtime container such as nvidia, set it here. - runtimeClassName: "" - tolerations: - - key: nvidia.com/gpu - operator: Exists - effect: NoSchedule - service: - type: ClusterIP - annotations: {} - port: 80 - containerPort: 11434 - gpu: - # -- Enable additional ENV values to help Ollama discover GPU usage - enabled: false - -webui: - annotations: {} - podAnnotations: {} - replicaCount: 1 - image: - repository: ghcr.io/open-webui/open-webui - tag: "" - pullPolicy: Always - resources: {} - ingress: - enabled: false - class: "" - # -- Use appropriate annotations for your Ingress controller, e.g., for NGINX: - # nginx.ingress.kubernetes.io/rewrite-target: / - annotations: {} - host: "" - tls: false - existingSecret: "" - persistence: - enabled: true - size: 2Gi - existingClaim: "" - # -- If using multiple replicas, you must update accessModes to ReadWriteMany - accessModes: - - ReadWriteOnce - storageClass: "" - selector: {} - annotations: {} - nodeSelector: {} - tolerations: [] - service: - type: ClusterIP - annotations: {} - port: 80 - containerPort: 8080 - nodePort: "" - labels: {} - loadBalancerClass: "" From 55321a3b1252853d1728a06c19a966928533cadf Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 07:34:42 +0200 Subject: [PATCH 13/63] Added new translation strings + 1 i18n kkey --- src/lib/i18n/locales/de-DE/translation.json | 45 +++++++++++---------- src/routes/(app)/+layout.svelte | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 647f2faf82..5df1cd0b09 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -15,13 +15,13 @@ "Add a short description about what this modelfile does": "Füge eine kurze Beschreibung hinzu, was dieses Modelfile kann", "Add a short title for this prompt": "Füge einen kurzen Titel für diesen Prompt hinzu", "Add a tag": "Tag hinzufügen", - "Add custom prompt": "", + "Add custom prompt": "Eigenen Prompt hinzufügen", "Add Docs": "Dokumente hinzufügen", "Add Files": "Dateien hinzufügen", "Add message": "Nachricht eingeben", "Add Model": "Modell hinzufügen", "Add Tags": "Tags hinzufügen", - "Add User": "", + "Add User": "User hinzufügen", "Adjusting these settings will apply changes universally to all users.": "Das Anpassen dieser Einstellungen wirkt sich universell auf alle Benutzer aus.", "admin": "Administrator", "Admin Panel": "Admin Panel", @@ -39,13 +39,13 @@ "API Base URL": "API Basis URL", "API Key": "API Key", "API Key created.": "API Key erstellt", - "API keys": "", + "API keys": "API Schlüssel", "API RPM": "API RPM", "Archive": "Archivieren", "Archived Chats": "Archivierte Chats", "are allowed - Activate this command by typing": "sind erlaubt - Aktiviere diesen Befehl, indem du", "Are you sure?": "Bist du sicher?", - "Attach file": "", + "Attach file": "Datei anhängen", "Attention to detail": "Auge fürs Detail", "Audio": "Audio", "Auto-playback response": "Automatische Wiedergabe der Antwort", @@ -55,10 +55,10 @@ "available!": "verfügbar!", "Back": "Zurück", "Bad Response": "Schlechte Antwort", - "before": "", + "before": "bereits geteilt", "Being lazy": "Faul sein", "Builder Mode": "Builder Modus", - "Bypass SSL verification for Websites": "", + "Bypass SSL verification for Websites": "Bypass SSL-Verifizierung für Websites", "Cancel": "Abbrechen", "Categories": "Kategorien", "Change Password": "Passwort ändern", @@ -73,12 +73,12 @@ "Chunk Overlap": "Chunk Overlap", "Chunk Params": "Chunk Parameter", "Chunk Size": "Chunk Size", - "Citation": "", + "Citation": "Zitate", "Click here for help.": "Klicke hier für Hilfe.", "Click here to": "Klicke hier, um", "Click here to check other modelfiles.": "Klicke hier, um andere Modelfiles zu überprüfen.", "Click here to select": "Klicke hier um auszuwählen", - "Click here to select a csv file.": "", + "Click here to select a csv file.": "Klicke hier um eine CSV-Datei auszuwählen.", "Click here to select documents.": "Klicke hier um Dokumente auszuwählen", "click here.": "hier klicken.", "Click on the user role button to change a user's role.": "Klicke auf die Benutzerrollenschaltfläche, um die Rolle eines Benutzers zu ändern.", @@ -173,7 +173,7 @@ "Enter Max Tokens (litellm_params.max_tokens)": "Gib die maximalen Token ein (litellm_params.max_tokens) an", "Enter model tag (e.g. {{modelTag}})": "Gib den Model-Tag ein", "Enter Number of Steps (e.g. 50)": "Gib die Anzahl an Schritten ein (z.B. 50)", - "Enter Score": "", + "Enter Score": "Score eingeben", "Enter stop sequence": "Stop-Sequenz eingeben", "Enter Top K": "Gib Top K ein", "Enter URL (e.g. http://127.0.0.1:7860/)": "Gib die URL ein (z.B. http://127.0.0.1:7860/)", @@ -181,7 +181,7 @@ "Enter Your Email": "Gib deine E-Mail-Adresse ein", "Enter Your Full Name": "Gib deinen vollständigen Namen ein", "Enter Your Password": "Gib dein Passwort ein", - "Enter Your Role": "", + "Enter Your Role": "Gebe deine Rolle ein", "Experimental": "Experimentell", "Export All Chats (All Users)": "Alle Chats exportieren (alle Benutzer)", "Export Chats": "Chats exportieren", @@ -219,7 +219,7 @@ "Import Modelfiles": "Modelfiles importieren", "Import Prompts": "Prompts importieren", "Include `--api` flag when running stable-diffusion-webui": "Füge das `--api`-Flag hinzu, wenn Du stable-diffusion-webui nutzt", - "Input commands": "", + "Input commands": "Eingabebefehle", "Interface": "Benutzeroberfläche", "join our Discord for help.": "Trete unserem Discord bei, um Hilfe zu erhalten.", "JSON": "JSON", @@ -240,7 +240,7 @@ "Max Tokens": "Maximale Tokens", "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Es können maximal 3 Modelle gleichzeitig heruntergeladen werden. Bitte versuche es später erneut.", "Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "Fortlaudende Nachrichten in diesem Chat werden nicht automatisch geteilt. Benutzer mit dem Link können den Chat einsehen.", - "Minimum Score": "", + "Minimum Score": "Mindestscore", "Mirostat": "Mirostat", "Mirostat Eta": "Mirostat Eta", "Mirostat Tau": "Mirostat Tau", @@ -280,7 +280,7 @@ "Off": "Aus", "Okay, Let's Go!": "Okay, los geht's!", "OLED Dark": "OLED Dunkel", - "Ollama": "", + "Ollama": "Ollama", "Ollama Base URL": "Ollama Basis URL", "Ollama Version": "Ollama-Version", "On": "Ein", @@ -293,7 +293,7 @@ "Open AI": "Open AI", "Open AI (Dall-E)": "Open AI (Dall-E)", "Open new chat": "Neuen Chat öffnen", - "OpenAI": "", + "OpenAI": "OpenAI", "OpenAI API": "OpenAI-API", "OpenAI API Config": "OpenAI API Konfiguration", "OpenAI API Key is required.": "OpenAI API Key erforderlich.", @@ -333,12 +333,12 @@ "Repeat Last N": "Repeat Last N", "Repeat Penalty": "Repeat Penalty", "Request Mode": "Request-Modus", - "Reranking Model": "", - "Reranking model disabled": "", + "Reranking Model": "Reranking Modell", + "Reranking model disabled": "Rranking Modell deaktiviert", "Reranking model set to \"{{reranking_model}}\"": "", "Reset Vector Storage": "Vektorspeicher zurücksetzen", "Response AutoCopy to Clipboard": "Antwort automatisch in die Zwischenablage kopieren", - "Retrieval Augmented Generation Settings": "", + "Retrieval Augmented Generation Settings": "Retrieval Augmented Generation Einstellungen", "Role": "Rolle", "Rosé Pine": "Rosé Pine", "Rosé Pine Dawn": "Rosé Pine Dawn", @@ -387,7 +387,7 @@ "Sign Out": "Abmelden", "Sign up": "Registrieren", "Signing in": "Anmeldung", - "Source": "", + "Source": "Quellen", "Speech recognition error: {{error}}": "Spracherkennungsfehler: {{error}}", "Speech-to-Text Engine": "Sprache-zu-Text-Engine", "SpeechRecognition API is not supported in this browser.": "Die Spracherkennungs-API wird in diesem Browser nicht unterstützt.", @@ -408,7 +408,7 @@ "Text-to-Speech Engine": "Text-zu-Sprache-Engine", "Tfs Z": "Tfs Z", "Thanks for your feedback!": "Danke für dein Feedback", - "The score should be a value between 0.0 (0%) and 1.0 (100%).": "", + "The score should be a value between 0.0 (0%) and 1.0 (100%).": "Der Score sollte ein Wert zwischen 0,0 (0 %) und 1,0 (100 %) sein.", "Theme": "Design", "This ensures that your valuable conversations are securely saved to your backend database. Thank you!": "Dadurch werden deine wertvollen Unterhaltungen sicher in der Backend-Datenbank gespeichert. Vielen Dank!", "This setting does not sync across browsers or devices.": "Diese Einstellung wird nicht zwischen Browsern oder Geräten synchronisiert.", @@ -450,8 +450,8 @@ "Version": "Version", "Warning: If you update or change your embedding model, you will need to re-import all documents.": "Warnung: Wenn du dein Einbettungsmodell aktualisierst oder änderst, musst du alle Dokumente erneut importieren.", "Web": "Web", - "Web Params": "", - "Webhook URL": "", + "Web Params": "Web Parameter", + "Webhook URL": "Webhook URL", "WebUI Add-ons": "WebUI-Add-Ons", "WebUI Settings": "WebUI-Einstellungen", "WebUI will make requests to": "Wenn aktiviert sendet WebUI externe Anfragen an", @@ -465,5 +465,6 @@ "You have shared this chat": "Du hast diesen Chat", "You're a helpful assistant.": "Du bist ein hilfreicher Assistent.", "You're now logged in.": "Du bist nun eingeloggt.", - "Youtube": "" + "Youtube": "YouTube", + "Help": "Hilfe" } diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index c44d1afe36..d59e316ff6 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -177,7 +177,7 @@ {/if} diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 647f2faf82..6b282e9421 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -465,5 +465,22 @@ "You have shared this chat": "Du hast diesen Chat", "You're a helpful assistant.": "Du bist ein hilfreicher Assistent.", "You're now logged in.": "Du bist nun eingeloggt.", - "Youtube": "" + "Youtube": "YouTube", + "Help": "Hilfe", + "Today": "Heute", + "Yesterday": "Gestern", + "Previous 7 days": "Vorherige 7 Tage", + "Previous 30 days": "Vorherige 30 Tage", + "January": "Januar", + "February": "Februar", + "March": "März", + "April": "April", + "May": "Mai", + "June": "Juni", + "July": "Juli", + "August": "August", + "September": "September", + "October": "Oktober", + "November": "November", + "December": "Dezember" } From 8d5f35a4042608840b4deb0916523e6a276859ad Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 08:11:48 +0200 Subject: [PATCH 15/63] addition --- src/lib/i18n/locales/de-DE/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 5df1cd0b09..ad50b5103f 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -112,7 +112,7 @@ "Custom": "Benutzerdefiniert", "Customize Ollama models for a specific purpose": "Ollama-Modelle für einen bestimmten Zweck anpassen", "Dark": "Dunkel", - "Dashboard": "", + "Dashboard": "Dashboard", "Database": "Datenbank", "DD/MM/YYYY HH:mm": "DD.MM.YYYY HH:mm", "Default": "Standard", From 11dcbb2e15bf181c00bd8a2d94067bb05c1b8d3f Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 08:18:58 +0200 Subject: [PATCH 16/63] fix Submit button not beeing a i18n key --- src/lib/components/chat/Messages/RateComment.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Messages/RateComment.svelte b/src/lib/components/chat/Messages/RateComment.svelte index 05eaae39fc..cbf82bca23 100644 --- a/src/lib/components/chat/Messages/RateComment.svelte +++ b/src/lib/components/chat/Messages/RateComment.svelte @@ -123,7 +123,7 @@ submitHandler(); }} > - Submit + {$i18n.t('Submit')}
From 3404b8dd13c239a07ce9ab4b00d3a439ce5ccf67 Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 08:43:25 +0200 Subject: [PATCH 17/63] added some missing keys --- src/lib/components/chat/MessageInput/Documents.svelte | 2 +- src/lib/components/chat/MessageInput/Suggestions.svelte | 8 +++++--- src/lib/i18n/locales/de-DE/translation.json | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Documents.svelte b/src/lib/components/chat/MessageInput/Documents.svelte index 37fb672c84..b38cc5f1bd 100644 --- a/src/lib/components/chat/MessageInput/Documents.svelte +++ b/src/lib/components/chat/MessageInput/Documents.svelte @@ -24,7 +24,7 @@ { name: 'All Documents', type: 'collection', - title: 'All Documents', + title: $i18n.t('All Documents'), collection_names: $documents.map((doc) => doc.collection_name) } ] diff --git a/src/lib/components/chat/MessageInput/Suggestions.svelte b/src/lib/components/chat/MessageInput/Suggestions.svelte index f094d17aee..c4485f9c66 100644 --- a/src/lib/components/chat/MessageInput/Suggestions.svelte +++ b/src/lib/components/chat/MessageInput/Suggestions.svelte @@ -1,6 +1,8 @@ diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index d4e047f415..39554acb24 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -134,7 +134,7 @@ const editChatTitle = async (id, _title) => { if (_title === '') { - toast.error('Title cannot be an empty string.'); + toast.error($i18n.t('Title cannot be an empty string.')); } else { title = _title; From 06683f5ac04fc9b0c189a4d55039a5c606d72498 Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 11:54:34 +0200 Subject: [PATCH 26/63] changed german spelling --- src/lib/i18n/locales/de-DE/translation.json | 28 ++++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 7fcb68088a..f8c9441b3f 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -139,7 +139,7 @@ "Discover a prompt": "Einen Prompt entdecken", "Discover, download, and explore custom prompts": "Benutzerdefinierte Prompts entdecken, herunterladen und erkunden", "Discover, download, and explore model presets": "Modellvorgaben entdecken, herunterladen und erkunden", - "Display the username instead of You in the Chat": "Den Benutzernamen anstelle von 'Du' im Chat anzeigen", + "Display the username instead of You in the Chat": "Den Benutzernamen anstelle von 'du' im Chat anzeigen", "Document": "Dokument", "Document Settings": "Dokumenteinstellungen", "Documents": "Dokumente", @@ -218,7 +218,7 @@ "Import Documents Mapping": "Dokumentenmapping importieren", "Import Modelfiles": "Modelfiles importieren", "Import Prompts": "Prompts importieren", - "Include `--api` flag when running stable-diffusion-webui": "Füge das `--api`-Flag hinzu, wenn Du stable-diffusion-webui nutzt", + "Include `--api` flag when running stable-diffusion-webui": "Füge das `--api`-Flag hinzu, wenn du stable-diffusion-webui nutzt", "Input commands": "Eingabebefehle", "Interface": "Benutzeroberfläche", "join our Discord for help.": "Trete unserem Discord bei, um Hilfe zu erhalten.", @@ -274,7 +274,7 @@ "No source available": "", "Not factually correct": "Nicht sachlich korrekt.", "Not sure what to add?": "Nicht sicher, was hinzugefügt werden soll?", - "Not sure what to write? Switch to": "Nicht sicher, was Du schreiben sollst? Wechsel zu", + "Not sure what to write? Switch to": "Nicht sicher, was du schreiben sollst? Wechsel zu", "Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "", "Notifications": "Desktop-Benachrichtigungen", "Off": "Aus", @@ -288,7 +288,7 @@ "Only alphanumeric characters and hyphens are allowed in the command string.": "Nur alphanumerische Zeichen und Bindestriche sind im Befehlsstring erlaubt.", "Oops! Hold tight! Your files are still in the processing oven. We're cooking them up to perfection. Please be patient and we'll let you know once they're ready.": "Hoppla! Warte noch einen Moment! Die Dateien sind noch im der Verarbeitung. Bitte habe etwas Geduld und wir informieren Dich, sobald sie bereit sind.", "Oops! Looks like the URL is invalid. Please double-check and try again.": "Hoppla! Es sieht so aus, als wäre die URL ungültig. Bitte überprüfe sie und versuche es nochmal.", - "Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "Hoppla! Du verwendest eine nicht unterstützte Methode (nur Frontend). Bitte stelle die WebUI vom Backend aus bereit.", + "Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "Hoppla! du verwendest eine nicht unterstützte Methode (nur Frontend). Bitte stelle die WebUI vom Backend aus bereit.", "Open": "Öffne", "Open AI": "Open AI", "Open AI (Dall-E)": "Open AI (Dall-E)", @@ -323,7 +323,7 @@ "Raw Format": "Rohformat", "Read Aloud": "Vorlesen", "Record voice": "Stimme aufnehmen", - "Redirecting you to OpenWebUI Community": "Du wirst zur OpenWebUI-Community weitergeleitet", + "Redirecting you to OpenWebUI Community": "du wirst zur OpenWebUI-Community weitergeleitet", "Refused when it shouldn't have": "Abgelehnt, obwohl es nicht hätte sein sollen.", "Regenerate": "Neu generieren", "Release Notes": "Versionshinweise", @@ -346,7 +346,7 @@ "Save & Create": "Speichern und erstellen", "Save & Submit": "Speichern und senden", "Save & Update": "Speichern und aktualisieren", - "Saving chat logs directly to your browser's storage is no longer supported. Please take a moment to download and delete your chat logs by clicking the button below. Don't worry, you can easily re-import your chat logs to the backend through": "Das direkte Speichern von Chat-Protokollen im Browser-Speicher wird nicht mehr unterstützt. Bitte nimm Dir einen Moment Zeit, um deine Chat-Protokolle herunterzuladen und zu löschen, indem Du auf die Schaltfläche unten klickst. Keine Sorge, Du kannst deine Chat-Protokolle problemlos über das Backend wieder importieren.", + "Saving chat logs directly to your browser's storage is no longer supported. Please take a moment to download and delete your chat logs by clicking the button below. Don't worry, you can easily re-import your chat logs to the backend through": "Das direkte Speichern von Chat-Protokollen im Browser-Speicher wird nicht mehr unterstützt. Bitte nimm Dir einen Moment Zeit, um deine Chat-Protokolle herunterzuladen und zu löschen, indem du auf die Schaltfläche unten klickst. Keine Sorge, du kannst deine Chat-Protokolle problemlos über das Backend wieder importieren.", "Scan": "Scannen", "Scan complete!": "Scan abgeschlossen!", "Scan for documents from {{path}}": "Dokumente von {{path}} scannen", @@ -460,14 +460,18 @@ "Whisper (Local)": "Whisper (Lokal)", "Write a prompt suggestion (e.g. Who are you?)": "Gebe einen Prompt-Vorschlag ein (z.B. Wer bist du?)", "Write a summary in 50 words that summarizes [topic or keyword].": "Schreibe eine kurze Zusammenfassung in 50 Wörtern, die [Thema oder Schlüsselwort] zusammenfasst.", - "You": "Du", - "You have no archived conversations.": "Du hast keine archivierten Unterhaltungen.", - "You have shared this chat": "Du hast diesen Chat", - "You're a helpful assistant.": "Du bist ein hilfreicher Assistent.", - "You're now logged in.": "Du bist nun eingeloggt.", + "You": "du", + "You have no archived conversations.": "du hast keine archivierten Unterhaltungen.", + "You have shared this chat": "du hast diesen Chat", + "You're a helpful assistant.": "du bist ein hilfreicher Assistent.", + "You're now logged in.": "du bist nun eingeloggt.", "Youtube": "YouTube", "Help": "Hilfe", "All Documents": "Alle Dokumente", "Suggested": "Vorgeschlagen", - "Prompt": "Prompt" + "Prompt": "Prompt", + "Download canceled": "Download abgebrochen", + "Invalid Tag": "Ungültiger Tag", + "Title cannot be an empty string.": "Titel darf nicht leer sein." + } From a2d0f9ce1d21649d9d0aec34a0d2e62392ccd1d7 Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 11:56:41 +0200 Subject: [PATCH 27/63] fix german spelling --- src/lib/i18n/locales/de-DE/translation.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index f8c9441b3f..3b192c84be 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -323,7 +323,7 @@ "Raw Format": "Rohformat", "Read Aloud": "Vorlesen", "Record voice": "Stimme aufnehmen", - "Redirecting you to OpenWebUI Community": "du wirst zur OpenWebUI-Community weitergeleitet", + "Redirecting you to OpenWebUI Community": "Du wirst zur OpenWebUI-Community weitergeleitet", "Refused when it shouldn't have": "Abgelehnt, obwohl es nicht hätte sein sollen.", "Regenerate": "Neu generieren", "Release Notes": "Versionshinweise", @@ -460,11 +460,11 @@ "Whisper (Local)": "Whisper (Lokal)", "Write a prompt suggestion (e.g. Who are you?)": "Gebe einen Prompt-Vorschlag ein (z.B. Wer bist du?)", "Write a summary in 50 words that summarizes [topic or keyword].": "Schreibe eine kurze Zusammenfassung in 50 Wörtern, die [Thema oder Schlüsselwort] zusammenfasst.", - "You": "du", - "You have no archived conversations.": "du hast keine archivierten Unterhaltungen.", - "You have shared this chat": "du hast diesen Chat", - "You're a helpful assistant.": "du bist ein hilfreicher Assistent.", - "You're now logged in.": "du bist nun eingeloggt.", + "You": "Du", + "You have no archived conversations.": "Du hast keine archivierten Unterhaltungen.", + "You have shared this chat": "Du hast diesen Chat", + "You're a helpful assistant.": "Du bist ein hilfreicher Assistent.", + "You're now logged in.": "Du bist nun eingeloggt.", "Youtube": "YouTube", "Help": "Hilfe", "All Documents": "Alle Dokumente", From 7ce157a8b8bfcb37ce56835c507ce869fe6cecde Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 7 May 2024 12:00:03 +0200 Subject: [PATCH 28/63] fix german spelling --- src/lib/i18n/locales/de-DE/translation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 3b192c84be..9f280a5b3e 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -208,7 +208,7 @@ "Hello, {{name}}": "Hallo, {{name}}", "Hide": "Verbergen", "Hide Additional Params": "Verstecke zusätzliche Parameter", - "How can I help you today?": "Wie kann ich Dir heute helfen?", + "How can I help you today?": "Wie kann ich dir heute helfen?", "Hybrid Search": "Hybride Suche", "Image Generation (Experimental)": "Bildgenerierung (experimentell)", "Image Generation Engine": "Bildgenerierungs-Engine", @@ -346,7 +346,7 @@ "Save & Create": "Speichern und erstellen", "Save & Submit": "Speichern und senden", "Save & Update": "Speichern und aktualisieren", - "Saving chat logs directly to your browser's storage is no longer supported. Please take a moment to download and delete your chat logs by clicking the button below. Don't worry, you can easily re-import your chat logs to the backend through": "Das direkte Speichern von Chat-Protokollen im Browser-Speicher wird nicht mehr unterstützt. Bitte nimm Dir einen Moment Zeit, um deine Chat-Protokolle herunterzuladen und zu löschen, indem du auf die Schaltfläche unten klickst. Keine Sorge, du kannst deine Chat-Protokolle problemlos über das Backend wieder importieren.", + "Saving chat logs directly to your browser's storage is no longer supported. Please take a moment to download and delete your chat logs by clicking the button below. Don't worry, you can easily re-import your chat logs to the backend through": "Das direkte Speichern von Chat-Protokollen im Browser-Speicher wird nicht mehr unterstützt. Bitte nimm dir einen Moment Zeit, um deine Chat-Protokolle herunterzuladen und zu löschen, indem du auf die Schaltfläche unten klickst. Keine Sorge, du kannst deine Chat-Protokolle problemlos über das Backend wieder importieren.", "Scan": "Scannen", "Scan complete!": "Scan abgeschlossen!", "Scan for documents from {{path}}": "Dokumente von {{path}} scannen", From 242e70d1819fe05802dd554e0b7436a4e5f22a46 Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Tue, 7 May 2024 23:47:47 +0800 Subject: [PATCH 29/63] Adjust text formatting per Chinese copywriting guidelines Refined text formatting to follow the recommendations from: https://sparanoid.com/note/chinese-copywriting-guidelines/ --- src/lib/i18n/locales/zh-CN/translation.json | 68 ++++++++++----------- src/lib/i18n/locales/zh-TW/translation.json | 10 +-- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index 64192d55f2..59e5001adb 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -46,7 +46,7 @@ "Attention to detail": "", "Audio": "音频", "Auto-playback response": "自动播放回应", - "Auto-send input after 3 sec.": "3秒后自动发送输入", + "Auto-send input after 3 sec.": "3 秒后自动发送输入", "AUTOMATIC1111 Base URL": "AUTOMATIC1111 基础 URL", "AUTOMATIC1111 Base URL is required.": "需要 AUTOMATIC1111 基础 URL。", "available!": "可用!", @@ -65,9 +65,9 @@ "Check for updates": "检查更新", "Checking for updates...": "正在检查更新...", "Choose a model before saving...": "保存前选择一个模型...", - "Chunk Overlap": "块重叠(Chunk Overlap)", - "Chunk Params": "块参数(Chunk Params)", - "Chunk Size": "块大小(Chunk Size)", + "Chunk Overlap": "块重叠 (Chunk Overlap)", + "Chunk Params": "块参数 (Chunk Params)", + "Chunk Size": "块大小 (Chunk Size)", "Click here for help.": "点击这里获取帮助。", "Click here to check other modelfiles.": "点击这里检查其他模型文件。", "Click here to select": "点击这里选择", @@ -93,7 +93,7 @@ "Copy last response": "复制最后一次回复", "Copy Link": "", "Copying to clipboard was successful!": "复制到剪贴板成功!", - "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "为以下查询创建一个简洁的、3-5个词的短语作为标题,严格遵守3-5个词的限制并避免使用“标题”一词:", + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "为以下查询创建一个简洁的、3-5 个词的短语作为标题,严格遵守 3-5 个词的限制并避免使用“标题”一词:", "Create a modelfile": "创建模型文件", "Create Account": "创建账户", "Created at": "创建于", @@ -101,7 +101,7 @@ "Current Model": "当前模型", "Current Password": "当前密码", "Custom": "自定义", - "Customize Ollama models for a specific purpose": "定制特定用途的Ollama模型", + "Customize Ollama models for a specific purpose": "定制特定用途的 Ollama 模型", "Dark": "暗色", "Database": "数据库", "DD/MM/YYYY HH:mm": "DD/MM/YYYY HH:mm", @@ -151,16 +151,16 @@ "Enabled": "启用", "Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "", "Enter {{role}} message here": "在此处输入 {{role}} 信息", - "Enter Chunk Overlap": "输入块重叠(Chunk Overlap)", - "Enter Chunk Size": "输入块大小(Chunk Size)", - "Enter Image Size (e.g. 512x512)": "输入图片大小(例如 512x512)", + "Enter Chunk Overlap": "输入块重叠 (Chunk Overlap)", + "Enter Chunk Size": "输入块大小 (Chunk Size)", + "Enter Image Size (e.g. 512x512)": "输入图片大小 (例如 512x512)", "Enter LiteLLM API Base URL (litellm_params.api_base)": "输入 LiteLLM API 基本 URL (litellm_params.api_base)", "Enter LiteLLM API Key (litellm_params.api_key)": "输入 LiteLLM API 密匙 (litellm_params.api_key)", "Enter LiteLLM API RPM (litellm_params.rpm)": "输入 LiteLLM API 速率限制 (litellm_params.rpm)", "Enter LiteLLM Model (litellm_params.model)": "输入 LiteLLM 模型 (litellm_params.model)", "Enter Max Tokens (litellm_params.max_tokens)": "输入模型的 Max Tokens (litellm_params.max_tokens)", - "Enter model tag (e.g. {{modelTag}})": "输入模型标签(例如{{modelTag}})", - "Enter Number of Steps (e.g. 50)": "输入步数(例如50)", + "Enter model tag (e.g. {{modelTag}})": "输入模型标签 (例如{{modelTag}})", + "Enter Number of Steps (e.g. 50)": "输入步数 (例如 50)", "Enter Score": "", "Enter stop sequence": "输入停止序列", "Enter Top K": "输入 Top K", @@ -205,26 +205,26 @@ "Import Documents Mapping": "导入文档映射", "Import Modelfiles": "导入模型文件", "Import Prompts": "导入提示", - "Include `--api` flag when running stable-diffusion-webui": "运行stable-diffusion-webui时包含`--api`标志", + "Include `--api` flag when running stable-diffusion-webui": "运行 stable-diffusion-webui 时包含 `--api` 标志", "Interface": "界面", - "join our Discord for help.": "加入我们的Discord寻求帮助。", + "join our Discord for help.": "加入我们的 Discord 寻求帮助。", "JSON": "JSON", - "JWT Expiration": "JWT过期", - "JWT Token": "JWT令牌", + "JWT Expiration": "JWT 过期", + "JWT Token": "JWT 令牌", "Keep Alive": "保持活动", "Keyboard shortcuts": "键盘快捷键", "Language": "语言", "Last Active": "", "Light": "浅色", "Listening...": "监听中...", - "LLMs can make mistakes. Verify important information.": "LLM可能会生成错误信息,请验证重要信息。", - "Made by OpenWebUI Community": "由OpenWebUI社区制作", + "LLMs can make mistakes. Verify important information.": "LLM 可能会生成错误信息,请验证重要信息。", + "Made by OpenWebUI Community": "由 OpenWebUI 社区制作", "Make sure to enclose them with": "确保将它们包含在内", - "Manage LiteLLM Models": "管理LiteLLM模型", + "Manage LiteLLM Models": "管理 LiteLLM 模型", "Manage Models": "管理模型", - "Manage Ollama Models": "管理Ollama模型", + "Manage Ollama Models": "管理 Ollama 模型", "Max Tokens": "最大令牌数", - "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "最多可以同时下载3个模型,请稍后重试。", + "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "最多可以同时下载 3 个模型,请稍后重试。", "Minimum Score": "", "Mirostat": "Mirostat", "Mirostat Eta": "Mirostat Eta", @@ -268,7 +268,7 @@ "Ollama Version": "Ollama 版本", "On": "开", "Only": "仅", - "Only alphanumeric characters and hyphens are allowed in the command string.": "命令字符串中只允许使用英文字母,数字(0-9)以及连字符(-)。", + "Only alphanumeric characters and hyphens are allowed in the command string.": "命令字符串中只允许使用英文字母,数字 (0-9) 以及连字符 (-)。", "Oops! Hold tight! Your files are still in the processing oven. We're cooking them up to perfection. Please be patient and we'll let you know once they're ready.": "哎呀!请稍等!您的文件仍在处理中。我们正在将它们做得尽善尽美,请耐心等待,一旦准备好我们会通知您。", "Oops! Looks like the URL is invalid. Please double-check and try again.": "哎呀!看起来 URL 无效。请仔细检查后再试一次。", "Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "哎呀!您正在使用不支持的方法(仅限前端)。请从后端提供 WebUI。", @@ -286,7 +286,7 @@ "Parameters": "参数", "Password": "密码", "PDF document (.pdf)": "", - "PDF Extract Images (OCR)": "PDF图像处理(使用OCR)", + "PDF Extract Images (OCR)": "PDF 图像处理 (使用 OCR)", "pending": "待定", "Permission denied when accessing microphone: {{error}}": "访问麦克风时权限被拒绝:{{error}}", "Plain text (.txt)": "", @@ -336,7 +336,7 @@ "Seed": "种子", "Select a mode": "选择一个模式", "Select a model": "选择一个模型", - "Select an Ollama instance": "选择一个Ollama实例", + "Select an Ollama instance": "选择一个 Ollama 实例", "Send a Message": "发送消息", "Send message": "发送消息", "Server connection verified": "已验证服务器连接", @@ -350,7 +350,7 @@ "Settings saved successfully!": "设置已保存", "Share": "", "Share Chat": "", - "Share to OpenWebUI Community": "分享到OpenWebUI社区", + "Share to OpenWebUI Community": "分享到 OpenWebUI 社区", "short-summary": "简短总结", "Show": "显示", "Show Additional Params": "显示额外参数", @@ -363,7 +363,7 @@ "Signing in": "", "Speech recognition error: {{error}}": "语音识别错误:{{error}}", "Speech-to-Text Engine": "语音转文字引擎", - "SpeechRecognition API is not supported in this browser.": "此浏览器不支持SpeechRecognition API。", + "SpeechRecognition API is not supported in this browser.": "此浏览器不支持 SpeechRecognition API。", "Stop Sequence": "停止序列", "STT Settings": "语音转文字设置", "Submit": "提交", @@ -386,22 +386,22 @@ "This ensures that your valuable conversations are securely saved to your backend database. Thank you!": "这确保了您宝贵的对话被安全保存到后端数据库中。谢谢!", "This setting does not sync across browsers or devices.": "此设置不会在浏览器或设备之间同步。", "Thorough explanation": "", - "Tip: Update multiple variable slots consecutively by pressing the tab key in the chat input after each replacement.": "提示:在每次替换后,在聊天输入中按Tab键可以连续更新多个变量。", + "Tip: Update multiple variable slots consecutively by pressing the tab key in the chat input after each replacement.": "提示:在每次替换后,在聊天输入中按 Tab 键可以连续更新多个变量。", "Title": "标题", "Title (e.g. Tell me a fun fact)": "", "Title Auto-Generation": "标题自动生成", "Title Generation Prompt": "自动生成标题的提示词", "to": "到", "To access the available model names for downloading,": "要访问可下载的模型名称,", - "To access the GGUF models available for downloading,": "要访问可下载的GGUF模型,", + "To access the GGUF models available for downloading,": "要访问可下载的 GGUF 模型,", "to chat input.": "到聊天输入。", "Toggle settings": "切换设置", "Toggle sidebar": "切换侧边栏", "Top K": "Top K", "Top P": "Top P", - "Trouble accessing Ollama?": "访问Ollama时遇到问题?", + "Trouble accessing Ollama?": "访问 Ollama 时遇到问题?", "TTS Settings": "文本转语音设置", - "Type Hugging Face Resolve (Download) URL": "输入Hugging Face解析(下载)URL", + "Type Hugging Face Resolve (Download) URL": "输入 Hugging Face 解析(下载)URL", "Uh-oh! There was an issue connecting to {{provider}}.": "哎呀!连接到{{provider}}时出现问题。", "Unknown File Type '{{file_type}}', but accepting and treating as plain text": "未知文件类型'{{file_type}}',将视为纯文本进行处理", "Update and Copy Link": "", @@ -410,12 +410,12 @@ "Update password": "更新密码", "Update Reranking Model": "", "Update reranking model (e.g. {{model}})": "", - "Upload a GGUF model": "上传一个GGUF模型", + "Upload a GGUF model": "上传一个 GGUF 模型", "Upload files": "上传文件", "Upload Progress": "上传进度", - "URL Mode": "URL模式", + "URL Mode": "URL 模式", "Use '#' in the prompt input to load and select your documents.": "在提示输入中使用'#'来加载和选择你的文档。", - "Use Gravatar": "使用Gravatar", + "Use Gravatar": "使用 Gravatar", "Use Initials": "", "user": "用户", "User Permissions": "用户权限", @@ -430,12 +430,12 @@ "Webhook URL": "", "WebUI Add-ons": "WebUI 插件", "WebUI Settings": "WebUI 设置", - "WebUI will make requests to": "WebUI将请求", + "WebUI will make requests to": "WebUI 将请求", "What’s New in": "最新变化", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "当历史记录被关闭时,这个浏览器上的新聊天不会出现在你任何设备的历史记录中。", "Whisper (Local)": "Whisper(本地)", "Write a prompt suggestion (e.g. Who are you?)": "写一个提示建议(例如:你是谁?)", - "Write a summary in 50 words that summarizes [topic or keyword].": "用50个字写一个总结[主题或关键词]。", + "Write a summary in 50 words that summarizes [topic or keyword].": "用 50 个字写一个总结 [主题或关键词]。", "You": "你", "You're a helpful assistant.": "你是一个有帮助的助手。", "You're now logged in.": "已登录。", diff --git a/src/lib/i18n/locales/zh-TW/translation.json b/src/lib/i18n/locales/zh-TW/translation.json index 0976c81106..a306f31ab6 100644 --- a/src/lib/i18n/locales/zh-TW/translation.json +++ b/src/lib/i18n/locales/zh-TW/translation.json @@ -46,7 +46,7 @@ "Attention to detail": "", "Audio": "音訊", "Auto-playback response": "自動播放回答", - "Auto-send input after 3 sec.": "3秒後自動傳送輸入內容", + "Auto-send input after 3 sec.": "3 秒後自動傳送輸入內容", "AUTOMATIC1111 Base URL": "AUTOMATIC1111 基本 URL", "AUTOMATIC1111 Base URL is required.": "需要 AUTOMATIC1111 基本 URL", "available!": "可以使用!", @@ -192,7 +192,7 @@ "Generation Info": "", "Good Response": "", "has no conversations.": "", - "Hello, {{name}}": "你好, {{name}}", + "Hello, {{name}}": "你好,{{name}}", "Hide": "隱藏", "Hide Additional Params": "隱藏額外參數", "How can I help you today?": "今天能為你做什麼?", @@ -288,7 +288,7 @@ "PDF document (.pdf)": "", "PDF Extract Images (OCR)": "PDF 圖像擷取(OCR 光學文字辨識)", "pending": "待審查", - "Permission denied when accessing microphone: {{error}}": "存取麥克風時被拒絕權限: {{error}}", + "Permission denied when accessing microphone: {{error}}": "存取麥克風時被拒絕權限:{{error}}", "Plain text (.txt)": "", "Playground": "AI 對話遊樂場", "Positive attitude": "", @@ -361,7 +361,7 @@ "Sign Out": "登出", "Sign up": "註冊", "Signing in": "", - "Speech recognition error: {{error}}": "語音識別錯誤: {{error}}", + "Speech recognition error: {{error}}": "語音識別錯誤:{{error}}", "Speech-to-Text Engine": "語音轉文字引擎", "SpeechRecognition API is not supported in this browser.": "此瀏覽器不支持 SpeechRecognition API。", "Stop Sequence": "停止序列", @@ -435,7 +435,7 @@ "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "當歷史被關閉時,這個瀏覽器上的新聊天將不會出現在任何裝置的歷史記錄中。", "Whisper (Local)": "Whisper(本機)", "Write a prompt suggestion (e.g. Who are you?)": "寫一個提示詞建議(例如:你是誰?)", - "Write a summary in 50 words that summarizes [topic or keyword].": "寫一個50字的摘要來概括[主題或關鍵詞]。", + "Write a summary in 50 words that summarizes [topic or keyword].": "寫一個 50 字的摘要來概括 [主題或關鍵詞]。", "You": "你", "You're a helpful assistant.": "你是一位善於協助他人的助手。", "You're now logged in.": "已登入。", From ea69c24bf77e046c5740b7cfceed5850f7775220 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 7 May 2024 11:39:32 -0700 Subject: [PATCH 30/63] fix: allow message switch during regeneration Co-Authored-By: Pandazki --- .../chat/Messages/ResponseMessage.svelte | 376 +++++++++--------- .../components/chat/Messages/Skeleton.svelte | 2 +- 2 files changed, 189 insertions(+), 189 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 8c444588b6..d71f3fd3f5 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -352,192 +352,192 @@ {/if} - {#if message.content === ''} - - {:else} - {#if message.files} -
- {#each message.files as file} -
- {#if file.type === 'image'} - - {/if} -
- {/each} -
- {/if} + {#if message.files} +
+ {#each message.files as file} +
+ {#if file.type === 'image'} + + {/if} +
+ {/each} +
+ {/if} -
-
- {#if edit === true} -
-