Quellcode durchsuchen

Merge branch 'dev' into dev

Timothy Jaeryang Baek vor 11 Monaten
Ursprung
Commit
8a9c18ddd5
38 geänderte Dateien mit 163 neuen und 40 gelöschten Zeilen
  1. 49 14
      backend/apps/rag/search/searxng.py
  2. 9 14
      src/lib/components/chat/MessageInput.svelte
  3. 35 11
      src/lib/components/chat/Settings/Audio.svelte
  4. 2 0
      src/lib/i18n/locales/ar-BH/translation.json
  5. 2 0
      src/lib/i18n/locales/bg-BG/translation.json
  6. 2 0
      src/lib/i18n/locales/bn-BD/translation.json
  7. 2 0
      src/lib/i18n/locales/ca-ES/translation.json
  8. 2 0
      src/lib/i18n/locales/ceb-PH/translation.json
  9. 2 0
      src/lib/i18n/locales/de-DE/translation.json
  10. 2 0
      src/lib/i18n/locales/dg-DG/translation.json
  11. 2 0
      src/lib/i18n/locales/en-GB/translation.json
  12. 2 0
      src/lib/i18n/locales/en-US/translation.json
  13. 2 0
      src/lib/i18n/locales/es-ES/translation.json
  14. 2 0
      src/lib/i18n/locales/fa-IR/translation.json
  15. 2 0
      src/lib/i18n/locales/fi-FI/translation.json
  16. 2 0
      src/lib/i18n/locales/fr-CA/translation.json
  17. 2 0
      src/lib/i18n/locales/fr-FR/translation.json
  18. 2 0
      src/lib/i18n/locales/he-IL/translation.json
  19. 2 0
      src/lib/i18n/locales/hi-IN/translation.json
  20. 2 0
      src/lib/i18n/locales/hr-HR/translation.json
  21. 2 0
      src/lib/i18n/locales/it-IT/translation.json
  22. 2 0
      src/lib/i18n/locales/ja-JP/translation.json
  23. 2 0
      src/lib/i18n/locales/ka-GE/translation.json
  24. 2 0
      src/lib/i18n/locales/ko-KR/translation.json
  25. 2 0
      src/lib/i18n/locales/nl-NL/translation.json
  26. 2 0
      src/lib/i18n/locales/pa-IN/translation.json
  27. 2 0
      src/lib/i18n/locales/pl-PL/translation.json
  28. 2 0
      src/lib/i18n/locales/pt-BR/translation.json
  29. 2 0
      src/lib/i18n/locales/pt-PT/translation.json
  30. 2 0
      src/lib/i18n/locales/ru-RU/translation.json
  31. 2 0
      src/lib/i18n/locales/sr-RS/translation.json
  32. 2 0
      src/lib/i18n/locales/sv-SE/translation.json
  33. 2 0
      src/lib/i18n/locales/tr-TR/translation.json
  34. 2 0
      src/lib/i18n/locales/uk-UA/translation.json
  35. 2 0
      src/lib/i18n/locales/vi-VN/translation.json
  36. 3 1
      src/lib/i18n/locales/zh-CN/translation.json
  37. 2 0
      src/lib/i18n/locales/zh-TW/translation.json
  38. 1 0
      src/lib/stores/index.ts

+ 49 - 14
backend/apps/rag/search/searxng.py

@@ -1,7 +1,8 @@
 import logging
-
 import requests
 
+from typing import List
+
 from apps.rag.search.main import SearchResult
 from config import SRC_LOG_LEVELS
 
@@ -9,20 +10,52 @@ log = logging.getLogger(__name__)
 log.setLevel(SRC_LOG_LEVELS["RAG"])
 
 
-def search_searxng(query_url: str, query: str, count: int) -> list[SearchResult]:
-    """Search a SearXNG instance for a query and return the results as a list of SearchResult objects.
+def search_searxng(query_url: str, query: str, count: int, **kwargs) -> List[SearchResult]:
+    """
+    Search a SearXNG instance for a given query and return the results as a list of SearchResult objects.
+    
+    The function allows passing additional parameters such as language or time_range to tailor the search result.
 
     Args:
-        query_url (str): The URL of the SearXNG instance to search. Must contain "<query>" as a placeholder
-        query (str): The query to search for
+        query_url (str): The base URL of the SearXNG server with a placeholder for the query "<query>".
+        query (str): The search term or question to find in the SearXNG database.
+        count (int): The maximum number of results to retrieve from the search.
+        
+    Keyword Args:
+        language (str): Language filter for the search results; e.g., "en-US". Defaults to an empty string.
+        time_range (str): Time range for filtering results by date; e.g., "2023-04-05..today" or "all-time". Defaults to ''.
+        categories: (Optional[List[str]]): Specific categories within which the search should be performed, defaulting to an empty string if not provided.
+    
+    Returns:
+        List[SearchResult]: A list of SearchResults sorted by relevance score in descending order.
+        
+    Raise:
+        requests.exceptions.RequestException: If a request error occurs during the search process.
     """
-    url = query_url.replace("<query>", query)
-    if "&format=json" not in url:
-        url += "&format=json"
-    log.debug(f"searching {url}")
+    
+    # Default values for optional parameters are provided as empty strings or None when not specified.
+    language = kwargs.get('language', 'en-US')
+    time_range = kwargs.get('time_range', '')
+    categories = ''.join(kwargs.get('categories', []))
+
+    params = {
+        "q": query,
+        "format": "json",
+        "pageno": 1,
+        "results_per_page": count,
+        'language': language,
+        'time_range': time_range,
+        'engines': '',
+        'categories': categories,
+        'theme': 'simple',
+        'image_proxy': 0
 
-    r = requests.get(
-        url,
+    }
+
+    log.debug(f"searching {query_url}")
+
+    response = requests.get(
+        query_url,
         headers={
             "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) RAG Bot",
             "Accept": "text/html",
@@ -30,15 +63,17 @@ def search_searxng(query_url: str, query: str, count: int) -> list[SearchResult]
             "Accept-Language": "en-US,en;q=0.5",
             "Connection": "keep-alive",
         },
+        params=params,
     )
-    r.raise_for_status()
 
-    json_response = r.json()
+    response.raise_for_status()  # Raise an exception for HTTP errors.
+
+    json_response = response.json()
     results = json_response.get("results", [])
     sorted_results = sorted(results, key=lambda x: x.get("score", 0), reverse=True)
     return [
         SearchResult(
             link=result["url"], title=result.get("title"), snippet=result.get("content")
         )
-        for result in sorted_results[:count]
+        for result in sorted_results
     ]

+ 9 - 14
src/lib/components/chat/MessageInput.svelte

@@ -810,10 +810,7 @@
 								? $i18n.t('Listening...')
 								: $i18n.t('Send a Message')}
 							bind:value={prompt}
-							on:keypress={(e) => {}}
-							on:keydown={async (e) => {
-								// Check if the device is not a mobile device or if it is a mobile device, check if it is not a touch device
-								// This is to prevent the Enter key from submitting the prompt on mobile devices
+							on:keypress={(e) => {
 								if (
 									!$mobile ||
 									!(
@@ -822,22 +819,18 @@
 										navigator.msMaxTouchPoints > 0
 									)
 								) {
-									// Check if Enter is pressed
-									// Check if Shift key is not pressed
+									// Prevent Enter key from creating a new line
 									if (e.key === 'Enter' && !e.shiftKey) {
 										e.preventDefault();
 									}
 
-									if (e.key === 'Enter' && !e.shiftKey && prompt !== '') {
+									// Submit the prompt when Enter key is pressed
+									if (prompt !== '' && e.key === 'Enter' && !e.shiftKey) {
 										submitPrompt(prompt, user);
-										return;
-									}
-
-									if (e.key === 'Enter' && e.shiftKey && prompt !== '') {
-										return;
 									}
 								}
-
+							}}
+							on:keydown={async (e) => {
 								const isCtrlPressed = e.ctrlKey || e.metaKey; // metaKey is for Cmd key on Mac
 
 								// Check if Ctrl + R is pressed
@@ -898,7 +891,9 @@
 										...document.getElementsByClassName('selected-command-option-button')
 									]?.at(-1);
 
-									if (commandOptionButton) {
+									if (e.shiftKey) {
+										prompt = `${prompt}\n`;
+									} else if (commandOptionButton) {
 										commandOptionButton?.click();
 									} else {
 										document.getElementById('send-message-button')?.click();

+ 35 - 11
src/lib/components/chat/Settings/Audio.svelte

@@ -3,6 +3,7 @@
 	import { user, settings } from '$lib/stores';
 	import { createEventDispatcher, onMount, getContext } from 'svelte';
 	import { toast } from 'svelte-sonner';
+	import Switch from '$lib/components/common/Switch.svelte';
 	const dispatch = createEventDispatcher();
 
 	const i18n = getContext('i18n');
@@ -13,6 +14,7 @@
 
 	let OpenAIUrl = '';
 	let OpenAIKey = '';
+	let OpenAISpeaker = '';
 
 	let STTEngines = ['', 'openai'];
 	let STTEngine = '';
@@ -20,6 +22,7 @@
 	let conversationMode = false;
 	let speechAutoSend = false;
 	let responseAutoPlayback = false;
+	let nonLocalVoices = false;
 
 	let TTSEngines = ['', 'openai'];
 	let TTSEngine = '';
@@ -86,14 +89,14 @@
 				url: OpenAIUrl,
 				key: OpenAIKey,
 				model: model,
-				speaker: speaker
+				speaker: OpenAISpeaker
 			});
 
 			if (res) {
 				OpenAIUrl = res.OPENAI_API_BASE_URL;
 				OpenAIKey = res.OPENAI_API_KEY;
 				model = res.OPENAI_API_MODEL;
-				speaker = res.OPENAI_API_VOICE;
+				OpenAISpeaker = res.OPENAI_API_VOICE;
 			}
 		}
 	};
@@ -105,6 +108,7 @@
 
 		STTEngine = $settings?.audio?.STTEngine ?? '';
 		TTSEngine = $settings?.audio?.TTSEngine ?? '';
+		nonLocalVoices = $settings.audio?.nonLocalVoices ?? false;
 		speaker = $settings?.audio?.speaker ?? '';
 		model = $settings?.audio?.model ?? '';
 
@@ -122,7 +126,10 @@
 				OpenAIUrl = res.OPENAI_API_BASE_URL;
 				OpenAIKey = res.OPENAI_API_KEY;
 				model = res.OPENAI_API_MODEL;
-				speaker = res.OPENAI_API_VOICE;
+				OpenAISpeaker = res.OPENAI_API_VOICE;
+				if (TTSEngine === 'openai') {
+					speaker = OpenAISpeaker;
+				}
 			}
 		}
 	});
@@ -138,8 +145,14 @@
 			audio: {
 				STTEngine: STTEngine !== '' ? STTEngine : undefined,
 				TTSEngine: TTSEngine !== '' ? TTSEngine : undefined,
-				speaker: speaker !== '' ? speaker : undefined,
-				model: model !== '' ? model : undefined
+				speaker:
+					(TTSEngine === 'openai' ? OpenAISpeaker : speaker) !== ''
+						? TTSEngine === 'openai'
+							? OpenAISpeaker
+							: speaker
+						: undefined,
+				model: model !== '' ? model : undefined,
+				nonLocalVoices: nonLocalVoices
 			}
 		});
 		dispatch('save');
@@ -227,7 +240,7 @@
 						on:change={(e) => {
 							if (e.target.value === 'openai') {
 								getOpenAIVoices();
-								speaker = 'alloy';
+								OpenAISpeaker = 'alloy';
 								model = 'tts-1';
 							} else {
 								getWebAPIVoices();
@@ -290,16 +303,27 @@
 						<select
 							class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
 							bind:value={speaker}
-							placeholder="Select a voice"
 						>
-							<option value="" selected>{$i18n.t('Default')}</option>
-							{#each voices.filter((v) => v.localService === true) as voice}
-								<option value={voice.name} class="bg-gray-100 dark:bg-gray-700">{voice.name}</option
+							<option value="" selected={speaker !== ''}>{$i18n.t('Default')}</option>
+							{#each voices.filter((v) => nonLocalVoices || v.localService === true) as voice}
+								<option
+									value={voice.name}
+									class="bg-gray-100 dark:bg-gray-700"
+									selected={speaker === voice.name}>{voice.name}</option
 								>
 							{/each}
 						</select>
 					</div>
 				</div>
+				<div class="flex items-center justify-between mb-1">
+					<div class="text-sm">
+						{$i18n.t('Allow non-local voices')}
+					</div>
+
+					<div class="mt-1">
+						<Switch bind:state={nonLocalVoices} />
+					</div>
+				</div>
 			</div>
 		{:else if TTSEngine === 'openai'}
 			<div>
@@ -309,7 +333,7 @@
 						<input
 							list="voice-list"
 							class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
-							bind:value={speaker}
+							bind:value={OpenAISpeaker}
 							placeholder="Select a voice"
 						/>
 

+ 2 - 0
src/lib/i18n/locales/ar-BH/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "جميع المستخدمين",
 	"Allow": "يسمح",
 	"Allow Chat Deletion": "يستطيع حذف المحادثات",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "الأحرف الأبجدية الرقمية والواصلات",
 	"Already have an account?": "هل تملك حساب ؟",
 	"an assistant": "مساعد",
@@ -206,6 +207,7 @@
 	"Experimental": "تجريبي",
 	"Export": "تصدير",
 	"Export All Chats (All Users)": "تصدير جميع الدردشات (جميع المستخدمين)",
+	"Export chat (.json)": "",
 	"Export Chats": "تصدير جميع الدردشات",
 	"Export Documents Mapping": "تصدير وثائق الخرائط",
 	"Export Models": "نماذج التصدير",

+ 2 - 0
src/lib/i18n/locales/bg-BG/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Всички Потребители",
 	"Allow": "Позволи",
 	"Allow Chat Deletion": "Позволи Изтриване на Чат",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "алфанумерични знаци и тире",
 	"Already have an account?": "Вече имате акаунт? ",
 	"an assistant": "асистент",
@@ -206,6 +207,7 @@
 	"Experimental": "Експериментално",
 	"Export": "Износ",
 	"Export All Chats (All Users)": "Експортване на всички чатове (За всички потребители)",
+	"Export chat (.json)": "",
 	"Export Chats": "Експортване на чатове",
 	"Export Documents Mapping": "Експортване на документен мапинг",
 	"Export Models": "Експортиране на модели",

+ 2 - 0
src/lib/i18n/locales/bn-BD/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "সব ইউজার",
 	"Allow": "অনুমোদন",
 	"Allow Chat Deletion": "চ্যাট ডিলিট করতে দিন",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "ইংরেজি অক্ষর, সংখ্যা এবং হাইফেন",
 	"Already have an account?": "আগে থেকেই একাউন্ট আছে?",
 	"an assistant": "একটা এসিস্ট্যান্ট",
@@ -206,6 +207,7 @@
 	"Experimental": "পরিক্ষামূলক",
 	"Export": "রপ্তানি",
 	"Export All Chats (All Users)": "সব চ্যাট এক্সপোর্ট করুন (সব ইউজারের)",
+	"Export chat (.json)": "",
 	"Export Chats": "চ্যাটগুলো এক্সপোর্ট করুন",
 	"Export Documents Mapping": "ডকুমেন্টসমূহ ম্যাপিং এক্সপোর্ট করুন",
 	"Export Models": "রপ্তানি মডেল",

+ 2 - 0
src/lib/i18n/locales/ca-ES/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Tots els Usuaris",
 	"Allow": "Permet",
 	"Allow Chat Deletion": "Permet la Supressió del Xat",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caràcters alfanumèrics i guions",
 	"Already have an account?": "Ja tens un compte?",
 	"an assistant": "un assistent",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimental",
 	"Export": "Exportar",
 	"Export All Chats (All Users)": "Exporta Tots els Xats (Tots els Usuaris)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exporta Xats",
 	"Export Documents Mapping": "Exporta el Mapatge de Documents",
 	"Export Models": "Models d'exportació",

+ 2 - 0
src/lib/i18n/locales/ceb-PH/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Ang tanan nga mga tiggamit",
 	"Allow": "Sa pagtugot",
 	"Allow Chat Deletion": "Tugoti nga mapapas ang mga chat",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alphanumeric nga mga karakter ug hyphen",
 	"Already have an account?": "Naa na kay account ?",
 	"an assistant": "usa ka katabang",
@@ -206,6 +207,7 @@
 	"Experimental": "Eksperimento",
 	"Export": "",
 	"Export All Chats (All Users)": "I-export ang tanan nga mga chat (Tanan nga tiggamit)",
+	"Export chat (.json)": "",
 	"Export Chats": "I-export ang mga chat",
 	"Export Documents Mapping": "I-export ang pagmapa sa dokumento",
 	"Export Models": "",

+ 2 - 0
src/lib/i18n/locales/de-DE/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Alle Benutzer",
 	"Allow": "Erlauben",
 	"Allow Chat Deletion": "Chat Löschung erlauben",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alphanumerische Zeichen und Bindestriche",
 	"Already have an account?": "Hast du vielleicht schon ein Account?",
 	"an assistant": "ein Assistent",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimentell",
 	"Export": "Exportieren",
 	"Export All Chats (All Users)": "Alle Chats exportieren (alle Benutzer)",
+	"Export chat (.json)": "",
 	"Export Chats": "Chats exportieren",
 	"Export Documents Mapping": "Dokumentenmapping exportieren",
 	"Export Models": "Modelle exportieren",

+ 2 - 0
src/lib/i18n/locales/dg-DG/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "All Users",
 	"Allow": "Allow",
 	"Allow Chat Deletion": "Allow Delete Chats",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "so alpha, many hyphen",
 	"Already have an account?": "Such account exists?",
 	"an assistant": "such assistant",
@@ -206,6 +207,7 @@
 	"Experimental": "Much Experiment",
 	"Export": "",
 	"Export All Chats (All Users)": "Export All Chats (All Doggos)",
+	"Export chat (.json)": "",
 	"Export Chats": "Export Barks",
 	"Export Documents Mapping": "Export Mappings of Dogos",
 	"Export Models": "",

+ 2 - 0
src/lib/i18n/locales/en-GB/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "",
 	"Allow": "",
 	"Allow Chat Deletion": "",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "",
 	"Already have an account?": "",
 	"an assistant": "",
@@ -206,6 +207,7 @@
 	"Experimental": "",
 	"Export": "",
 	"Export All Chats (All Users)": "",
+	"Export chat (.json)": "",
 	"Export Chats": "",
 	"Export Documents Mapping": "",
 	"Export Models": "",

+ 2 - 0
src/lib/i18n/locales/en-US/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "",
 	"Allow": "",
 	"Allow Chat Deletion": "",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "",
 	"Already have an account?": "",
 	"an assistant": "",
@@ -206,6 +207,7 @@
 	"Experimental": "",
 	"Export": "",
 	"Export All Chats (All Users)": "",
+	"Export chat (.json)": "",
 	"Export Chats": "",
 	"Export Documents Mapping": "",
 	"Export Models": "",

+ 2 - 0
src/lib/i18n/locales/es-ES/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Todos los Usuarios",
 	"Allow": "Permitir",
 	"Allow Chat Deletion": "Permitir Borrar Chats",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caracteres alfanuméricos y guiones",
 	"Already have an account?": "¿Ya tienes una cuenta?",
 	"an assistant": "un asistente",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimental",
 	"Export": "Exportar",
 	"Export All Chats (All Users)": "Exportar todos los chats (Todos los usuarios)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exportar Chats",
 	"Export Documents Mapping": "Exportar el mapeo de documentos",
 	"Export Models": "Modelos de exportación",

+ 2 - 0
src/lib/i18n/locales/fa-IR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "همه کاربران",
 	"Allow": "اجازه دادن",
 	"Allow Chat Deletion": "اجازه حذف گپ",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "حروف الفبایی و خط فاصله",
 	"Already have an account?": "از قبل حساب کاربری دارید؟",
 	"an assistant": "یک دستیار",
@@ -206,6 +207,7 @@
 	"Experimental": "آزمایشی",
 	"Export": "صادرات",
 	"Export All Chats (All Users)": "اکسپورت از همه گپ\u200cها(همه کاربران)",
+	"Export chat (.json)": "",
 	"Export Chats": "اکسپورت از گپ\u200cها",
 	"Export Documents Mapping": "اکسپورت از نگاشت اسناد",
 	"Export Models": "مدل های صادرات",

+ 2 - 0
src/lib/i18n/locales/fi-FI/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Kaikki käyttäjät",
 	"Allow": "Salli",
 	"Allow Chat Deletion": "Salli keskustelujen poisto",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "kirjaimia, numeroita ja väliviivoja",
 	"Already have an account?": "Onko sinulla jo tili?",
 	"an assistant": "avustaja",
@@ -206,6 +207,7 @@
 	"Experimental": "Kokeellinen",
 	"Export": "Vienti",
 	"Export All Chats (All Users)": "Vie kaikki keskustelut (kaikki käyttäjät)",
+	"Export chat (.json)": "",
 	"Export Chats": "Vie keskustelut",
 	"Export Documents Mapping": "Vie asiakirjakartoitus",
 	"Export Models": "Vie malleja",

+ 2 - 0
src/lib/i18n/locales/fr-CA/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Tous les utilisateurs",
 	"Allow": "Autoriser",
 	"Allow Chat Deletion": "Autoriser la suppression des discussions",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caractères alphanumériques et tirets",
 	"Already have an account?": "Vous avez déjà un compte ?",
 	"an assistant": "un assistant",
@@ -206,6 +207,7 @@
 	"Experimental": "Expérimental",
 	"Export": "Exportation",
 	"Export All Chats (All Users)": "Exporter toutes les discussions (Tous les utilisateurs)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exporter les discussions",
 	"Export Documents Mapping": "Exporter le mappage des documents",
 	"Export Models": "Modèles d’exportation",

+ 2 - 0
src/lib/i18n/locales/fr-FR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Tous les Utilisateurs",
 	"Allow": "Autoriser",
 	"Allow Chat Deletion": "Autoriser la suppression du chat",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caractères alphanumériques et tirets",
 	"Already have an account?": "Vous avez déjà un compte ?",
 	"an assistant": "un assistant",
@@ -206,6 +207,7 @@
 	"Experimental": "Expérimental",
 	"Export": "Exportation",
 	"Export All Chats (All Users)": "Exporter Tous les Chats (Tous les Utilisateurs)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exporter les Chats",
 	"Export Documents Mapping": "Exporter la Correspondance des Documents",
 	"Export Models": "Exporter les Modèles",

+ 2 - 0
src/lib/i18n/locales/he-IL/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "כל המשתמשים",
 	"Allow": "אפשר",
 	"Allow Chat Deletion": "אפשר מחיקת צ'אט",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "תווים אלפאנומריים ומקפים",
 	"Already have an account?": "כבר יש לך חשבון?",
 	"an assistant": "עוזר",
@@ -206,6 +207,7 @@
 	"Experimental": "ניסיוני",
 	"Export": "ייצא",
 	"Export All Chats (All Users)": "ייצוא כל הצ'אטים (כל המשתמשים)",
+	"Export chat (.json)": "",
 	"Export Chats": "ייצוא צ'אטים",
 	"Export Documents Mapping": "ייצוא מיפוי מסמכים",
 	"Export Models": "ייצוא מודלים",

+ 2 - 0
src/lib/i18n/locales/hi-IN/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "सभी उपयोगकर्ता",
 	"Allow": "अनुमति दें",
 	"Allow Chat Deletion": "चैट हटाने की अनुमति दें",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "अल्फ़ान्यूमेरिक वर्ण और हाइफ़न",
 	"Already have an account?": "क्या आपके पास पहले से एक खाता मौजूद है?",
 	"an assistant": "एक सहायक",
@@ -206,6 +207,7 @@
 	"Experimental": "प्रयोगात्मक",
 	"Export": "निर्यातित माल",
 	"Export All Chats (All Users)": "सभी चैट निर्यात करें (सभी उपयोगकर्ताओं की)",
+	"Export chat (.json)": "",
 	"Export Chats": "चैट निर्यात करें",
 	"Export Documents Mapping": "निर्यात दस्तावेज़ मैपिंग",
 	"Export Models": "निर्यात मॉडल",

+ 2 - 0
src/lib/i18n/locales/hr-HR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Svi korisnici",
 	"Allow": "Dopusti",
 	"Allow Chat Deletion": "Dopusti brisanje razgovora",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alfanumerički znakovi i crtice",
 	"Already have an account?": "Već imate račun?",
 	"an assistant": "asistent",
@@ -206,6 +207,7 @@
 	"Experimental": "Eksperimentalno",
 	"Export": "Izvoz",
 	"Export All Chats (All Users)": "Izvoz svih razgovora (svi korisnici)",
+	"Export chat (.json)": "",
 	"Export Chats": "Izvoz razgovora",
 	"Export Documents Mapping": "Izvoz mapiranja dokumenata",
 	"Export Models": "Izvezi modele",

+ 2 - 0
src/lib/i18n/locales/it-IT/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Tutti gli utenti",
 	"Allow": "Consenti",
 	"Allow Chat Deletion": "Consenti l'eliminazione della chat",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caratteri alfanumerici e trattini",
 	"Already have an account?": "Hai già un account?",
 	"an assistant": "un assistente",
@@ -206,6 +207,7 @@
 	"Experimental": "Sperimentale",
 	"Export": "Esportazione",
 	"Export All Chats (All Users)": "Esporta tutte le chat (tutti gli utenti)",
+	"Export chat (.json)": "",
 	"Export Chats": "Esporta chat",
 	"Export Documents Mapping": "Esporta mappatura documenti",
 	"Export Models": "Esporta modelli",

+ 2 - 0
src/lib/i18n/locales/ja-JP/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "すべてのユーザー",
 	"Allow": "許可",
 	"Allow Chat Deletion": "チャットの削除を許可",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "英数字とハイフン",
 	"Already have an account?": "すでにアカウントをお持ちですか?",
 	"an assistant": "アシスタント",
@@ -206,6 +207,7 @@
 	"Experimental": "実験的",
 	"Export": "輸出",
 	"Export All Chats (All Users)": "すべてのチャットをエクスポート (すべてのユーザー)",
+	"Export chat (.json)": "",
 	"Export Chats": "チャットをエクスポート",
 	"Export Documents Mapping": "ドキュメントマッピングをエクスポート",
 	"Export Models": "モデルのエクスポート",

+ 2 - 0
src/lib/i18n/locales/ka-GE/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "ყველა მომხმარებელი",
 	"Allow": "ნების დართვა",
 	"Allow Chat Deletion": "მიმოწერის წაშლის დაშვება",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "ალფანუმერული სიმბოლოები და დეფისები",
 	"Already have an account?": "უკვე გაქვს ანგარიში?",
 	"an assistant": "ასისტენტი",
@@ -206,6 +207,7 @@
 	"Experimental": "ექსპერიმენტალური",
 	"Export": "ექსპორტი",
 	"Export All Chats (All Users)": "ექსპორტი ყველა ჩათი (ყველა მომხმარებელი)",
+	"Export chat (.json)": "",
 	"Export Chats": "მიმოწერის ექსპორტირება",
 	"Export Documents Mapping": "დოკუმენტების კავშირის ექსპორტი",
 	"Export Models": "ექსპორტის მოდელები",

+ 2 - 0
src/lib/i18n/locales/ko-KR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "모든 사용자",
 	"Allow": "허용",
 	"Allow Chat Deletion": "채팅 삭제 허용",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "영문자,숫자 및 하이픈",
 	"Already have an account?": "이미 계정이 있으신가요?",
 	"an assistant": "어시스턴트",
@@ -206,6 +207,7 @@
 	"Experimental": "실험적",
 	"Export": "수출",
 	"Export All Chats (All Users)": "모든 채팅 내보내기 (모든 사용자)",
+	"Export chat (.json)": "",
 	"Export Chats": "채팅 내보내기",
 	"Export Documents Mapping": "문서 매핑 내보내기",
 	"Export Models": "모델 내보내기",

+ 2 - 0
src/lib/i18n/locales/nl-NL/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Alle Gebruikers",
 	"Allow": "Toestaan",
 	"Allow Chat Deletion": "Sta Chat Verwijdering toe",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alfanumerieke karakters en streepjes",
 	"Already have an account?": "Heb je al een account?",
 	"an assistant": "een assistent",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimenteel",
 	"Export": "Exporteren",
 	"Export All Chats (All Users)": "Exporteer Alle Chats (Alle Gebruikers)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exporteer Chats",
 	"Export Documents Mapping": "Exporteer Documenten Mapping",
 	"Export Models": "Modellen exporteren",

+ 2 - 0
src/lib/i18n/locales/pa-IN/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "ਸਾਰੇ ਉਪਭੋਗਤਾ",
 	"Allow": "ਅਨੁਮਤੀ",
 	"Allow Chat Deletion": "ਗੱਲਬਾਤ ਮਿਟਾਉਣ ਦੀ ਆਗਿਆ ਦਿਓ",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "ਅਲਫ਼ਾਨਯੂਮੈਰਿਕ ਅੱਖਰ ਅਤੇ ਹਾਈਫਨ",
 	"Already have an account?": "ਪਹਿਲਾਂ ਹੀ ਖਾਤਾ ਹੈ?",
 	"an assistant": "ਇੱਕ ਸਹਾਇਕ",
@@ -206,6 +207,7 @@
 	"Experimental": "ਪਰਮਾਣੂਕ੍ਰਿਤ",
 	"Export": "ਨਿਰਯਾਤ",
 	"Export All Chats (All Users)": "ਸਾਰੀਆਂ ਗੱਲਾਂ ਨਿਰਯਾਤ ਕਰੋ (ਸਾਰੇ ਉਪਭੋਗਤਾ)",
+	"Export chat (.json)": "",
 	"Export Chats": "ਗੱਲਾਂ ਨਿਰਯਾਤ ਕਰੋ",
 	"Export Documents Mapping": "ਡਾਕੂਮੈਂਟ ਮੈਪਿੰਗ ਨਿਰਯਾਤ ਕਰੋ",
 	"Export Models": "ਨਿਰਯਾਤ ਮਾਡਲ",

+ 2 - 0
src/lib/i18n/locales/pl-PL/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Wszyscy użytkownicy",
 	"Allow": "Pozwól",
 	"Allow Chat Deletion": "Pozwól na usuwanie czatu",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "znaki alfanumeryczne i myślniki",
 	"Already have an account?": "Masz już konto?",
 	"an assistant": "asystent",
@@ -206,6 +207,7 @@
 	"Experimental": "Eksperymentalne",
 	"Export": "Eksport",
 	"Export All Chats (All Users)": "Eksportuj wszystkie czaty (wszyscy użytkownicy)",
+	"Export chat (.json)": "",
 	"Export Chats": "Eksportuj czaty",
 	"Export Documents Mapping": "Eksportuj mapowanie dokumentów",
 	"Export Models": "Eksportuj modele",

+ 2 - 0
src/lib/i18n/locales/pt-BR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Todos os Usuários",
 	"Allow": "Permitir",
 	"Allow Chat Deletion": "Permitir Exclusão de Bate-papo",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caracteres alfanuméricos e hífens",
 	"Already have an account?": "Já tem uma conta?",
 	"an assistant": "um assistente",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimental",
 	"Export": "Exportação",
 	"Export All Chats (All Users)": "Exportar Todos os Bate-papos (Todos os Usuários)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exportar Bate-papos",
 	"Export Documents Mapping": "Exportar Mapeamento de Documentos",
 	"Export Models": "Modelos de Exportação",

+ 2 - 0
src/lib/i18n/locales/pt-PT/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Todos os Usuários",
 	"Allow": "Permitir",
 	"Allow Chat Deletion": "Permitir Exclusão de Bate-papo",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "caracteres alfanuméricos e hífens",
 	"Already have an account?": "Já tem uma conta?",
 	"an assistant": "um assistente",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimental",
 	"Export": "Exportação",
 	"Export All Chats (All Users)": "Exportar Todos os Bate-papos (Todos os Usuários)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exportar Bate-papos",
 	"Export Documents Mapping": "Exportar Mapeamento de Documentos",
 	"Export Models": "Modelos de Exportação",

+ 2 - 0
src/lib/i18n/locales/ru-RU/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Все пользователи",
 	"Allow": "Разрешить",
 	"Allow Chat Deletion": "Дозволять удаление чат",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "буквенно цифровые символы и дефисы",
 	"Already have an account?": "у вас уже есть аккаунт?",
 	"an assistant": "ассистент",
@@ -206,6 +207,7 @@
 	"Experimental": "Экспериментальное",
 	"Export": "Экспорт",
 	"Export All Chats (All Users)": "Экспортировать все чаты (все пользователи)",
+	"Export chat (.json)": "",
 	"Export Chats": "Экспортировать чаты",
 	"Export Documents Mapping": "Экспортировать отображение документов",
 	"Export Models": "Экспорт моделей",

+ 2 - 0
src/lib/i18n/locales/sr-RS/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Сви корисници",
 	"Allow": "Дозволи",
 	"Allow Chat Deletion": "Дозволи брисање ћаскања",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "алфанумерички знакови и цртице",
 	"Already have an account?": "Већ имате налог?",
 	"an assistant": "помоћник",
@@ -206,6 +207,7 @@
 	"Experimental": "Експериментално",
 	"Export": "Извоз",
 	"Export All Chats (All Users)": "Извези сва ћаскања (сви корисници)",
+	"Export chat (.json)": "",
 	"Export Chats": "Извези ћаскања",
 	"Export Documents Mapping": "Извези мапирање докумената",
 	"Export Models": "Извези моделе",

+ 2 - 0
src/lib/i18n/locales/sv-SE/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Alla användare",
 	"Allow": "Tillåt",
 	"Allow Chat Deletion": "Tillåt chattborttagning",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alfanumeriska tecken och bindestreck",
 	"Already have an account?": "Har du redan ett konto?",
 	"an assistant": "en assistent",
@@ -206,6 +207,7 @@
 	"Experimental": "Experimentell",
 	"Export": "Export",
 	"Export All Chats (All Users)": "Exportera alla chattar (alla användare)",
+	"Export chat (.json)": "",
 	"Export Chats": "Exportera chattar",
 	"Export Documents Mapping": "Exportera dokumentmappning",
 	"Export Models": "Exportera modeller",

+ 2 - 0
src/lib/i18n/locales/tr-TR/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Tüm Kullanıcılar",
 	"Allow": "İzin ver",
 	"Allow Chat Deletion": "Sohbet Silmeye İzin Ver",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "alfanumerik karakterler ve tireler",
 	"Already have an account?": "Zaten bir hesabınız mı var?",
 	"an assistant": "bir asistan",
@@ -206,6 +207,7 @@
 	"Experimental": "Deneysel",
 	"Export": "Ihracat",
 	"Export All Chats (All Users)": "Tüm Sohbetleri Dışa Aktar (Tüm Kullanıcılar)",
+	"Export chat (.json)": "",
 	"Export Chats": "Sohbetleri Dışa Aktar",
 	"Export Documents Mapping": "Belge Eşlemesini Dışa Aktar",
 	"Export Models": "Modelleri Dışa Aktar",

+ 2 - 0
src/lib/i18n/locales/uk-UA/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Всі користувачі",
 	"Allow": "Дозволити",
 	"Allow Chat Deletion": "Дозволити видалення чату",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "алфавітно-цифрові символи та дефіси",
 	"Already have an account?": "Вже є обліковий запис?",
 	"an assistant": "асистента",
@@ -206,6 +207,7 @@
 	"Experimental": "Експериментальне",
 	"Export": "Експорт",
 	"Export All Chats (All Users)": "Експортувати всі чати (всі користувачі)",
+	"Export chat (.json)": "",
 	"Export Chats": "Експортувати чати",
 	"Export Documents Mapping": "Експортувати відображення документів",
 	"Export Models": "Експорт моделей",

+ 2 - 0
src/lib/i18n/locales/vi-VN/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "Danh sách người sử dụng",
 	"Allow": "Cho phép",
 	"Allow Chat Deletion": "Cho phép Xóa nội dung chat",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "ký tự số và gạch nối",
 	"Already have an account?": "Bạn đã có tài khoản?",
 	"an assistant": "trợ lý",
@@ -206,6 +207,7 @@
 	"Experimental": "Thử nghiệm",
 	"Export": "Xuất khẩu",
 	"Export All Chats (All Users)": "Tải về tất cả nội dung chat (tất cả mọi người)",
+	"Export chat (.json)": "",
 	"Export Chats": "Tải nội dung chat về máy",
 	"Export Documents Mapping": "Tải cấu trúc tài liệu về máy",
 	"Export Models": "Tải Models về máy",

+ 3 - 1
src/lib/i18n/locales/zh-CN/translation.json

@@ -36,7 +36,8 @@
 	"All Documents": "所有文档",
 	"All Users": "所有用户",
 	"Allow": "允许",
-	"Allow Chat Deletion": "允许删除对话记录",
+	"Allow Chat Deletion": "允许删除聊天记录",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "字母数字字符和连字符",
 	"Already have an account?": "已经拥有账号了?",
 	"an assistant": "助手",
@@ -206,6 +207,7 @@
 	"Experimental": "实验性",
 	"Export": "导出",
 	"Export All Chats (All Users)": "导出所有用户对话",
+  "Export chat (.json)": "",
 	"Export Chats": "导出对话",
 	"Export Documents Mapping": "导出文档映射",
 	"Export Models": "导出模型",

+ 2 - 0
src/lib/i18n/locales/zh-TW/translation.json

@@ -37,6 +37,7 @@
 	"All Users": "所有使用者",
 	"Allow": "允許",
 	"Allow Chat Deletion": "允許刪除聊天紀錄",
+	"Allow non-local voices": "",
 	"alphanumeric characters and hyphens": "英文字母、數字(0~9)和連字符(-)",
 	"Already have an account?": "已經有帳號了嗎?",
 	"an assistant": "助手",
@@ -206,6 +207,7 @@
 	"Experimental": "實驗功能",
 	"Export": "出口",
 	"Export All Chats (All Users)": "匯出所有聊天紀錄(所有使用者)",
+	"Export chat (.json)": "",
 	"Export Chats": "匯出聊天紀錄",
 	"Export Documents Mapping": "匯出文件映射",
 	"Export Models": "匯出模型",

+ 1 - 0
src/lib/stores/index.ts

@@ -111,6 +111,7 @@ type AudioSettings = {
 	TTSEngine?: string;
 	speaker?: string;
 	model?: string;
+	nonLocalVoices?: boolean;
 };
 
 type TitleSettings = {