forked from open-webui/open-webui
add: added Playground + AddFilesPlaceholder translation
This commit is contained in:
parent
b9f53abf37
commit
7f9049c3a1
11 changed files with 73 additions and 25 deletions
|
@ -1,8 +1,13 @@
|
||||||
|
<script>
|
||||||
|
import { getContext } from 'svelte';
|
||||||
|
const i18n = getContext('i18n');
|
||||||
|
</script>
|
||||||
|
|
||||||
<div class=" text-center text-6xl mb-3">📄</div>
|
<div class=" text-center text-6xl mb-3">📄</div>
|
||||||
<div class="text-center dark:text-white text-2xl font-semibold z-50">Add Files</div>
|
<div class="text-center dark:text-white text-2xl font-semibold z-50">{$i18n.t('Add Files')}</div>
|
||||||
|
|
||||||
<slot
|
<slot
|
||||||
><div class=" mt-2 text-center text-sm dark:text-gray-200 w-full">
|
><div class=" mt-2 text-center text-sm dark:text-gray-200 w-full">
|
||||||
Drop any files here to add to the conversation
|
{$i18n.t('Drop any files here to add to the conversation')}
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -628,7 +628,7 @@
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class=" self-center font-medium">Playground</div>
|
<div class=" self-center font-medium">{$i18n.t('Playground')}</div>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from 'svelte';
|
import { onMount, getContext } from 'svelte';
|
||||||
|
|
||||||
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
export let messages = [];
|
export let messages = [];
|
||||||
|
|
||||||
|
@ -20,7 +22,7 @@
|
||||||
class="px-2 py-1 text-sm font-semibold uppercase min-w-[6rem] text-left dark:group-hover:bg-gray-800 rounded-lg transition"
|
class="px-2 py-1 text-sm font-semibold uppercase min-w-[6rem] text-left dark:group-hover:bg-gray-800 rounded-lg transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
message.role = message.role === 'user' ? 'assistant' : 'user';
|
message.role = message.role === 'user' ? 'assistant' : 'user';
|
||||||
}}>{message.role}</button
|
}}>{$i18n.t(message.role)}</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -28,7 +30,9 @@
|
||||||
<textarea
|
<textarea
|
||||||
id="{message.role}-{idx}-textarea"
|
id="{message.role}-{idx}-textarea"
|
||||||
class="w-full bg-transparent outline-none rounded-lg p-2 text-sm resize-none overflow-hidden"
|
class="w-full bg-transparent outline-none rounded-lg p-2 text-sm resize-none overflow-hidden"
|
||||||
placeholder="Enter {message.role === 'user' ? 'a user' : 'an assistant'} message here"
|
placeholder={$i18n.t(
|
||||||
|
`Enter ${message.role === 'user' ? 'a user' : 'an assistant'} message here`
|
||||||
|
)}
|
||||||
rows="1"
|
rows="1"
|
||||||
on:input={(e) => {
|
on:input={(e) => {
|
||||||
e.target.style.height = '';
|
e.target.style.height = '';
|
||||||
|
@ -100,6 +104,6 @@
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" text-sm font-medium">Add message</div>
|
<div class=" text-sm font-medium">{$i18n.t('Add message')}</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' oder '-1' für kein Ablaufdatum.",
|
"'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' oder '-1' für kein Ablaufdatum.",
|
||||||
|
"(Beta)": "(Beta)",
|
||||||
"(e.g. `sh webui.sh --api`)": "(z.B. `sh webui.sh --api`)",
|
"(e.g. `sh webui.sh --api`)": "(z.B. `sh webui.sh --api`)",
|
||||||
"{{item}} not provided": "{{item}} nicht angegeben",
|
"{{item}} not provided": "{{item}} nicht angegeben",
|
||||||
"{{modelName}} is thinking...": "{{modelName}} denkt nach...",
|
"{{modelName}} is thinking...": "{{modelName}} denkt nach...",
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
"Add Docs": "Dokumente hinzufügen",
|
"Add Docs": "Dokumente hinzufügen",
|
||||||
"Add Files": "Dateien hinzufügen",
|
"Add Files": "Dateien hinzufügen",
|
||||||
"Add LiteLLM Model": "LiteLLM Modell hinzufügen",
|
"Add LiteLLM Model": "LiteLLM Modell hinzufügen",
|
||||||
|
"Add message": "Nachricht eingeben",
|
||||||
"add tags": "Tags hinzufügen",
|
"add tags": "Tags hinzufügen",
|
||||||
"Adjusting these settings will apply changes universally to all users.": "Das Anpassen dieser Einstellungen wirkt sich universell auf alle Benutzer aus.",
|
"Adjusting these settings will apply changes universally to all users.": "Das Anpassen dieser Einstellungen wirkt sich universell auf alle Benutzer aus.",
|
||||||
"admin": "Administrator",
|
"admin": "Administrator",
|
||||||
|
@ -33,6 +35,7 @@
|
||||||
"API Key": "API Key",
|
"API Key": "API Key",
|
||||||
"API RPM": "API RPM",
|
"API RPM": "API RPM",
|
||||||
"are allowed - Activate this command by typing": "sind erlaubt - Aktivieren Sie diesen Befehl, indem Sie",
|
"are allowed - Activate this command by typing": "sind erlaubt - Aktivieren Sie diesen Befehl, indem Sie",
|
||||||
|
"assistant": "Assistent",
|
||||||
"Audio": "Audio",
|
"Audio": "Audio",
|
||||||
"Auto-playback response": "Automatische Wiedergabe der Antwort",
|
"Auto-playback response": "Automatische Wiedergabe der Antwort",
|
||||||
"Auto-send input after 3 sec.": "Automatisches Senden der Eingabe nach 3 Sek",
|
"Auto-send input after 3 sec.": "Automatisches Senden der Eingabe nach 3 Sek",
|
||||||
|
@ -43,6 +46,7 @@
|
||||||
"Cancel": "Abbrechen",
|
"Cancel": "Abbrechen",
|
||||||
"Categories": "Kategorien",
|
"Categories": "Kategorien",
|
||||||
"Change Password": "Passwort ändern",
|
"Change Password": "Passwort ändern",
|
||||||
|
"Chat": "Chat",
|
||||||
"Chat History": "Chat Verlauf",
|
"Chat History": "Chat Verlauf",
|
||||||
"Chat History is off for this browser.": "Chat Verlauf ist für diesen Browser ausgeschaltet.",
|
"Chat History is off for this browser.": "Chat Verlauf ist für diesen Browser ausgeschaltet.",
|
||||||
"Chats": "Chats",
|
"Chats": "Chats",
|
||||||
|
@ -107,6 +111,7 @@
|
||||||
"Don't have an account?": "Sie haben noch kein Konto?",
|
"Don't have an account?": "Sie haben noch kein Konto?",
|
||||||
"Download as a File": "Als Datei herunterladen",
|
"Download as a File": "Als Datei herunterladen",
|
||||||
"Download Database": "Datenbank herunterladen",
|
"Download Database": "Datenbank herunterladen",
|
||||||
|
"Drop any files here to add to the conversation": "Lassen Sie Dateien hier fallen, um sie dem Chat hinzuzufügen",
|
||||||
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "z.B. '30s','10m'. Gültige Zeiteinheiten sind 's', 'm', 'h'.",
|
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "z.B. '30s','10m'. Gültige Zeiteinheiten sind 's', 'm', 'h'.",
|
||||||
"Edit Doc": "Dokument bearbeiten",
|
"Edit Doc": "Dokument bearbeiten",
|
||||||
"Edit User": "Benutzer bearbeiten",
|
"Edit User": "Benutzer bearbeiten",
|
||||||
|
@ -114,6 +119,8 @@
|
||||||
"Enable Chat History": "Chat-Verlauf aktivieren",
|
"Enable Chat History": "Chat-Verlauf aktivieren",
|
||||||
"Enable New Sign Ups": "Neue Anmeldungen aktivieren",
|
"Enable New Sign Ups": "Neue Anmeldungen aktivieren",
|
||||||
"Enabled": "Aktiviert",
|
"Enabled": "Aktiviert",
|
||||||
|
"Enter a user message here": "Geben Sie hier eine Benutzernachricht ein",
|
||||||
|
"Enter an assistant message here": "Geben Sie hier eine Assistentennachricht ein",
|
||||||
"Enter OpenAI API Key": "OpenAI-API-Key eingeben",
|
"Enter OpenAI API Key": "OpenAI-API-Key eingeben",
|
||||||
"Enter stop sequence": "Stop-Sequenz eingeben",
|
"Enter stop sequence": "Stop-Sequenz eingeben",
|
||||||
"Enter Your Email": "Geben Sie Ihre E-Mail-Adresse ein",
|
"Enter Your Email": "Geben Sie Ihre E-Mail-Adresse ein",
|
||||||
|
@ -208,6 +215,7 @@
|
||||||
"Password": "Passwort",
|
"Password": "Passwort",
|
||||||
"pending": "ausstehend",
|
"pending": "ausstehend",
|
||||||
"Permission denied when accessing microphone: {{error}}": "Zugriff auf das Mikrofon verweigert: {{error}}",
|
"Permission denied when accessing microphone: {{error}}": "Zugriff auf das Mikrofon verweigert: {{error}}",
|
||||||
|
"Playground": "Playground",
|
||||||
"Profile": "Profil",
|
"Profile": "Profil",
|
||||||
"Prompt Content": "Prompt-Inhalt",
|
"Prompt Content": "Prompt-Inhalt",
|
||||||
"Prompt suggestions": "Prompt-Vorschläge",
|
"Prompt suggestions": "Prompt-Vorschläge",
|
||||||
|
@ -265,13 +273,16 @@
|
||||||
"SpeechRecognition API is not supported in this browser.": "Die SpeechRecognition-API wird in diesem Browser nicht unterstützt.",
|
"SpeechRecognition API is not supported in this browser.": "Die SpeechRecognition-API wird in diesem Browser nicht unterstützt.",
|
||||||
"Stop Sequence": "Stop Sequence",
|
"Stop Sequence": "Stop Sequence",
|
||||||
"STT Settings": "STT-Einstellungen",
|
"STT Settings": "STT-Einstellungen",
|
||||||
|
"Submit": "Senden",
|
||||||
"Success": "Erfolg",
|
"Success": "Erfolg",
|
||||||
"Successfully updated.": "Erfolgreich aktualisiert.",
|
"Successfully updated.": "Erfolgreich aktualisiert.",
|
||||||
"Sync All": "Alles synchronisieren",
|
"Sync All": "Alles synchronisieren",
|
||||||
|
"System": "System",
|
||||||
"System Prompt": "System-Prompt",
|
"System Prompt": "System-Prompt",
|
||||||
"Tags": "Tags",
|
"Tags": "Tags",
|
||||||
"Temperature": "Temperatur",
|
"Temperature": "Temperatur",
|
||||||
"Template": "Vorlage",
|
"Template": "Vorlage",
|
||||||
|
"Text Completion": "Textvervollständigung",
|
||||||
"Text-to-Speech Engine": "Text-zu-Sprache-Engine",
|
"Text-to-Speech Engine": "Text-zu-Sprache-Engine",
|
||||||
"Tfs Z": "Tfs Z",
|
"Tfs Z": "Tfs Z",
|
||||||
"Theme": "Design",
|
"Theme": "Design",
|
||||||
|
@ -310,5 +321,6 @@
|
||||||
"Whisper (Local)": "Whisper (Lokal)",
|
"Whisper (Local)": "Whisper (Lokal)",
|
||||||
"Write a prompt suggestion (e.g. Who are you?)": "Schreiben Sie einen Prompt-Vorschlag (z.B. Wer bist du?)",
|
"Write a prompt suggestion (e.g. Who are you?)": "Schreiben Sie einen Prompt-Vorschlag (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.",
|
"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're a helpful assistant.": "Du bist ein hilfreicher Assistent.",
|
||||||
"You're now logged in.": "Sie sind jetzt angemeldet."
|
"You're now logged in.": "Sie sind jetzt angemeldet."
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.",
|
"'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.",
|
||||||
|
"(Beta)": "(Beta)",
|
||||||
"(e.g. `sh webui.sh --api`)": "(e.g. `sh webui.sh --api`)",
|
"(e.g. `sh webui.sh --api`)": "(e.g. `sh webui.sh --api`)",
|
||||||
"{{item}} not provided": "{{item}} not provided",
|
"{{item}} not provided": "{{item}} not provided",
|
||||||
"{{modelName}} is thinking...": "{{modelName}} is thinking...",
|
"{{modelName}} is thinking...": "{{modelName}} is thinking...",
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
"Add Docs": "Add Docs",
|
"Add Docs": "Add Docs",
|
||||||
"Add Files": "Add Files",
|
"Add Files": "Add Files",
|
||||||
"Add LiteLLM Model": "Add LiteLLM Model",
|
"Add LiteLLM Model": "Add LiteLLM Model",
|
||||||
|
"Add message": "Add message",
|
||||||
"add tags": "add tags",
|
"add tags": "add tags",
|
||||||
"Adjusting these settings will apply changes universally to all users.": "Adjusting these settings will apply changes universally to all users.",
|
"Adjusting these settings will apply changes universally to all users.": "Adjusting these settings will apply changes universally to all users.",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
|
@ -33,6 +35,7 @@
|
||||||
"API Key": "API Key",
|
"API Key": "API Key",
|
||||||
"API RPM": "API RPM",
|
"API RPM": "API RPM",
|
||||||
"are allowed - Activate this command by typing": "are allowed - Activate this command by typing",
|
"are allowed - Activate this command by typing": "are allowed - Activate this command by typing",
|
||||||
|
"assistant": "Assistant",
|
||||||
"Audio": "Audio",
|
"Audio": "Audio",
|
||||||
"Auto-playback response": "Auto-playback response",
|
"Auto-playback response": "Auto-playback response",
|
||||||
"Auto-send input after 3 sec.": "Auto-send input after 3 sec.",
|
"Auto-send input after 3 sec.": "Auto-send input after 3 sec.",
|
||||||
|
@ -43,6 +46,7 @@
|
||||||
"Cancel": "Cancel",
|
"Cancel": "Cancel",
|
||||||
"Categories": "Categories",
|
"Categories": "Categories",
|
||||||
"Change Password": "Change Password",
|
"Change Password": "Change Password",
|
||||||
|
"Chat": "Chat",
|
||||||
"Chat History": "Chat History",
|
"Chat History": "Chat History",
|
||||||
"Chat History is off for this browser.": "Chat History is off for this browser.",
|
"Chat History is off for this browser.": "Chat History is off for this browser.",
|
||||||
"Chats": "Chats",
|
"Chats": "Chats",
|
||||||
|
@ -107,6 +111,7 @@
|
||||||
"Don't have an account?": "Don't have an account?",
|
"Don't have an account?": "Don't have an account?",
|
||||||
"Download as a File": "Download as a File",
|
"Download as a File": "Download as a File",
|
||||||
"Download Database": "Download Database",
|
"Download Database": "Download Database",
|
||||||
|
"Drop any files here to add to the conversation": "Drop any files here to add to the conversation",
|
||||||
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.",
|
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.",
|
||||||
"Edit Doc": "Edit Doc",
|
"Edit Doc": "Edit Doc",
|
||||||
"Edit User": "Edit User",
|
"Edit User": "Edit User",
|
||||||
|
@ -114,6 +119,8 @@
|
||||||
"Enable Chat History": "Enable Chat History",
|
"Enable Chat History": "Enable Chat History",
|
||||||
"Enable New Sign Ups": "Enable New Sign Ups",
|
"Enable New Sign Ups": "Enable New Sign Ups",
|
||||||
"Enabled": "Enabled",
|
"Enabled": "Enabled",
|
||||||
|
"Enter a user message here": "Enter a user message here",
|
||||||
|
"Enter an assistant message here": "Enter an assistant message here",
|
||||||
"Enter OpenAI API Key": "Enter OpenAI API Key",
|
"Enter OpenAI API Key": "Enter OpenAI API Key",
|
||||||
"Enter stop sequence": "Enter stop sequence",
|
"Enter stop sequence": "Enter stop sequence",
|
||||||
"Enter Your Email": "Enter Your Email",
|
"Enter Your Email": "Enter Your Email",
|
||||||
|
@ -208,6 +215,7 @@
|
||||||
"Password": "Password",
|
"Password": "Password",
|
||||||
"pending": "Pending",
|
"pending": "Pending",
|
||||||
"Permission denied when accessing microphone: {{error}}": "Permission denied when accessing microphone: {{error}}",
|
"Permission denied when accessing microphone: {{error}}": "Permission denied when accessing microphone: {{error}}",
|
||||||
|
"Playground": "Playground",
|
||||||
"Profile": "Profile",
|
"Profile": "Profile",
|
||||||
"Prompt Content": "Prompt Content",
|
"Prompt Content": "Prompt Content",
|
||||||
"Prompt suggestions": "Prompt suggestions",
|
"Prompt suggestions": "Prompt suggestions",
|
||||||
|
@ -265,13 +273,16 @@
|
||||||
"SpeechRecognition API is not supported in this browser.": "SpeechRecognition API is not supported in this browser.",
|
"SpeechRecognition API is not supported in this browser.": "SpeechRecognition API is not supported in this browser.",
|
||||||
"Stop Sequence": "Stop Sequence",
|
"Stop Sequence": "Stop Sequence",
|
||||||
"STT Settings": "STT Settings",
|
"STT Settings": "STT Settings",
|
||||||
|
"Submit": "Submit",
|
||||||
"Success": "Success",
|
"Success": "Success",
|
||||||
"Successfully updated.": "Successfully updated.",
|
"Successfully updated.": "Successfully updated.",
|
||||||
"Sync All": "Sync All",
|
"Sync All": "Sync All",
|
||||||
|
"System": "System",
|
||||||
"System Prompt": "System Prompt",
|
"System Prompt": "System Prompt",
|
||||||
"Tags": "Tags",
|
"Tags": "Tags",
|
||||||
"Temperature": "Temperature",
|
"Temperature": "Temperature",
|
||||||
"Template": "Template",
|
"Template": "Template",
|
||||||
|
"Text Completion": "Text Completion",
|
||||||
"Text-to-Speech Engine": "Text-to-Speech Engine",
|
"Text-to-Speech Engine": "Text-to-Speech Engine",
|
||||||
"Tfs Z": "Tfs Z",
|
"Tfs Z": "Tfs Z",
|
||||||
"Theme": "Theme",
|
"Theme": "Theme",
|
||||||
|
@ -310,5 +321,6 @@
|
||||||
"Whisper (Local)": "Whisper (Local)",
|
"Whisper (Local)": "Whisper (Local)",
|
||||||
"Write a prompt suggestion (e.g. Who are you?)": "Write a prompt suggestion (e.g. Who are you?)",
|
"Write a prompt suggestion (e.g. Who are you?)": "Write a prompt suggestion (e.g. Who are you?)",
|
||||||
"Write a summary in 50 words that summarizes [topic or keyword]": "Write a summary in 50 words that summarizes [topic or keyword]",
|
"Write a summary in 50 words that summarizes [topic or keyword]": "Write a summary in 50 words that summarizes [topic or keyword]",
|
||||||
|
"You're a helpful assistant.": "You're a helpful assistant.",
|
||||||
"You're now logged in.": "You're now logged in."
|
"You're now logged in.": "You're now logged in."
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,5 +310,17 @@
|
||||||
"Add a short title for this prompt": "یک عنوان کوتاه برای این درخواست اضافه کنید",
|
"Add a short title for this prompt": "یک عنوان کوتاه برای این درخواست اضافه کنید",
|
||||||
"Open": "باز",
|
"Open": "باز",
|
||||||
"Close": "بسته",
|
"Close": "بسته",
|
||||||
"sidebar": "نوار کناری"
|
"sidebar": "نوار کناری",
|
||||||
|
"Playground": "Playground",
|
||||||
|
"Submit": "Submit",
|
||||||
|
"(Beta)": "(Beta)",
|
||||||
|
"Text Completion": "Text Completion",
|
||||||
|
"Chat": "Chat",
|
||||||
|
"You're a helpful assistant.": "You're a helpful assistant.",
|
||||||
|
"System": "System",
|
||||||
|
"assistant": "Assistant",
|
||||||
|
"Add message": "Add message",
|
||||||
|
"Enter a user message here": "Enter a user message here",
|
||||||
|
"Enter an assistant message here": "Enter an assistant message here",
|
||||||
|
"Drop any files here to add to the conversation": "Drop any files here to add to the conversation"
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$i18n.t('Admin Panel')} | `${$WEBUI_NAME}`</title>
|
<title>{$i18n.t('Admin Panel')} | ${$WEBUI_NAME}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{#key selectedUser}
|
{#key selectedUser}
|
||||||
|
|
|
@ -152,9 +152,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>
|
<title>{$i18n.t('Documents')} | {$WEBUI_NAME}</title>
|
||||||
{`Documents | ${$WEBUI_NAME}`}
|
|
||||||
</title>
|
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{#if dragged}
|
{#if dragged}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>
|
<title>
|
||||||
{`Modelfiles | ${$WEBUI_NAME}`}
|
{$i18n.t('Modelfiles')} | {$WEBUI_NAME}
|
||||||
</title>
|
</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
import { onMount, tick } from 'svelte';
|
import { onMount, tick, getContext } from 'svelte';
|
||||||
|
|
||||||
import { toast } from 'svelte-sonner';
|
import { toast } from 'svelte-sonner';
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@
|
||||||
import { splitStream } from '$lib/utils';
|
import { splitStream } from '$lib/utils';
|
||||||
import ChatCompletion from '$lib/components/playground/ChatCompletion.svelte';
|
import ChatCompletion from '$lib/components/playground/ChatCompletion.svelte';
|
||||||
|
|
||||||
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
let mode = 'chat';
|
let mode = 'chat';
|
||||||
let loaded = false;
|
let loaded = false;
|
||||||
|
|
||||||
|
@ -300,7 +302,7 @@
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>
|
<title>
|
||||||
{`Playground | ${$WEBUI_NAME}`}
|
{$i18n.t('Playground')} | {$WEBUI_NAME}
|
||||||
</title>
|
</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
@ -311,7 +313,8 @@
|
||||||
<div class="flex flex-col justify-between mb-2.5 gap-1">
|
<div class="flex flex-col justify-between mb-2.5 gap-1">
|
||||||
<div class="flex justify-between items-center gap-2">
|
<div class="flex justify-between items-center gap-2">
|
||||||
<div class=" text-2xl font-semibold self-center flex">
|
<div class=" text-2xl font-semibold self-center flex">
|
||||||
Playground <span class=" text-xs text-gray-500 self-center ml-1">(Beta)</span>
|
{$i18n.t('Playground')}
|
||||||
|
<span class=" text-xs text-gray-500 self-center ml-1">{$i18n.t('(Beta)')}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -328,9 +331,9 @@
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if mode === 'complete'}
|
{#if mode === 'complete'}
|
||||||
Text Completion
|
{$i18n.t('Text Completion')}
|
||||||
{:else if mode === 'chat'}
|
{:else if mode === 'chat'}
|
||||||
Chat
|
{$i18n.t('Chat')}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -357,7 +360,9 @@
|
||||||
class="outline-none bg-transparent text-sm font-medium rounded-lg w-full placeholder-gray-400"
|
class="outline-none bg-transparent text-sm font-medium rounded-lg w-full placeholder-gray-400"
|
||||||
bind:value={selectedModelId}
|
bind:value={selectedModelId}
|
||||||
>
|
>
|
||||||
<option class=" text-gray-800" value="" selected disabled>Select a model</option>
|
<option class=" text-gray-800" value="" selected disabled
|
||||||
|
>{$i18n.t('Select a model')}</option
|
||||||
|
>
|
||||||
|
|
||||||
{#each $models as model}
|
{#each $models as model}
|
||||||
{#if model.name === 'hr'}
|
{#if model.name === 'hr'}
|
||||||
|
@ -402,12 +407,12 @@
|
||||||
{#if mode === 'chat'}
|
{#if mode === 'chat'}
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<div class="p-3 outline outline-1 outline-gray-200 dark:outline-gray-800 rounded-lg">
|
<div class="p-3 outline outline-1 outline-gray-200 dark:outline-gray-800 rounded-lg">
|
||||||
<div class=" text-sm font-medium">System</div>
|
<div class=" text-sm font-medium">{$i18n.t('System')}</div>
|
||||||
<textarea
|
<textarea
|
||||||
id="system-textarea"
|
id="system-textarea"
|
||||||
class="w-full h-full bg-transparent resize-none outline-none text-sm"
|
class="w-full h-full bg-transparent resize-none outline-none text-sm"
|
||||||
bind:value={system}
|
bind:value={system}
|
||||||
placeholder="You're a helpful assistant."
|
placeholder={$i18n.t("You're a helpful assistant.")}
|
||||||
rows="4"
|
rows="4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -425,7 +430,7 @@
|
||||||
id="text-completion-textarea"
|
id="text-completion-textarea"
|
||||||
class="w-full h-full p-3 bg-transparent outline outline-1 outline-gray-200 dark:outline-gray-800 resize-none rounded-lg text-sm"
|
class="w-full h-full p-3 bg-transparent outline outline-1 outline-gray-200 dark:outline-gray-800 resize-none rounded-lg text-sm"
|
||||||
bind:value={text}
|
bind:value={text}
|
||||||
placeholder="You're a helpful assistant."
|
placeholder={$i18n.t("You're a helpful assistant.")}
|
||||||
/>
|
/>
|
||||||
{:else if mode === 'chat'}
|
{:else if mode === 'chat'}
|
||||||
<ChatCompletion bind:messages />
|
<ChatCompletion bind:messages />
|
||||||
|
@ -442,7 +447,7 @@
|
||||||
submitHandler();
|
submitHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Submit
|
{$i18n.t('Submit')}
|
||||||
</button>
|
</button>
|
||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
|
@ -451,7 +456,7 @@
|
||||||
stopResponse();
|
stopResponse();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Cancel
|
{$i18n.t('Cancel')}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>
|
<title>
|
||||||
{`Prompts | ${$WEBUI_NAME}`}
|
{$i18n.t('Prompts')} | {$WEBUI_NAME}
|
||||||
</title>
|
</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue