chore: format

This commit is contained in:
Timothy J. Baek 2024-06-16 21:55:08 -07:00
parent 54b65a89fd
commit 1efa25eed5
41 changed files with 160 additions and 50 deletions

View File

@ -33,7 +33,11 @@ from utils.utils import (
from utils.misc import parse_duration, validate_email_format
from utils.webhook import post_webhook
from constants import ERROR_MESSAGES, WEBHOOK_MESSAGES
from config import WEBUI_AUTH, WEBUI_AUTH_TRUSTED_EMAIL_HEADER, WEBUI_AUTH_TRUSTED_NAME_HEADER
from config import (
WEBUI_AUTH,
WEBUI_AUTH_TRUSTED_EMAIL_HEADER,
WEBUI_AUTH_TRUSTED_NAME_HEADER,
)
router = APIRouter()
@ -112,7 +116,9 @@ async def signin(request: Request, form_data: SigninForm):
trusted_email = request.headers[WEBUI_AUTH_TRUSTED_EMAIL_HEADER].lower()
trusted_name = trusted_email
if WEBUI_AUTH_TRUSTED_NAME_HEADER:
trusted_name = request.headers.get(WEBUI_AUTH_TRUSTED_NAME_HEADER, trusted_email)
trusted_name = request.headers.get(
WEBUI_AUTH_TRUSTED_NAME_HEADER, trusted_email
)
if not Users.get_user_by_email(trusted_email.lower()):
await signup(
request,

View File

@ -294,9 +294,7 @@ WEBUI_AUTH = os.environ.get("WEBUI_AUTH", "True").lower() == "true"
WEBUI_AUTH_TRUSTED_EMAIL_HEADER = os.environ.get(
"WEBUI_AUTH_TRUSTED_EMAIL_HEADER", None
)
WEBUI_AUTH_TRUSTED_NAME_HEADER = os.environ.get(
"WEBUI_AUTH_TRUSTED_NAME_HEADER", None
)
WEBUI_AUTH_TRUSTED_NAME_HEADER = os.environ.get("WEBUI_AUTH_TRUSTED_NAME_HEADER", None)
JWT_EXPIRES_IN = PersistentConfig(
"JWT_EXPIRES_IN", "auth.jwt_expiry", os.environ.get("JWT_EXPIRES_IN", "-1")
)

View File

@ -80,7 +80,11 @@
class="text-xs text-gray-700 uppercase bg-transparent dark:text-gray-200 border-b-2 dark:border-gray-800"
>
<tr>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('title')}>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('title')}
>
{$i18n.t('Title')}
{#if sortKey === 'title'}
{sortOrder === 'asc' ? '▲' : '▼'}
@ -88,7 +92,11 @@
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('created_at')}>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('created_at')}
>
{$i18n.t('Created at')}
{#if sortKey === 'created_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
@ -96,7 +104,11 @@
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 hidden md:flex cursor-pointer select-none" on:click={() => setSortKey('updated_at')}>
<th
scope="col"
class="px-3 py-2 hidden md:flex cursor-pointer select-none"
on:click={() => setSortKey('updated_at')}
>
{$i18n.t('Updated at')}
{#if sortKey === 'updated_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
@ -108,12 +120,11 @@
</tr>
</thead>
<tbody>
{#each chats
.sort((a, b) => {
if (a[sortKey] < b[sortKey]) return sortOrder === 'asc' ? -1 : 1;
if (a[sortKey] > b[sortKey]) return sortOrder === 'asc' ? 1 : -1;
return 0;
}) as chat, idx}
{#each chats.sort((a, b) => {
if (a[sortKey] < b[sortKey]) return sortOrder === 'asc' ? -1 : 1;
if (a[sortKey] > b[sortKey]) return sortOrder === 'asc' ? 1 : -1;
return 0;
}) as chat, idx}
<tr
class="bg-transparent {idx !== chats.length - 1 &&
'border-b'} dark:bg-gray-900 dark:border-gray-850 text-xs"

View File

@ -499,6 +499,7 @@
"System": "النظام",
"System Prompt": "محادثة النظام",
"Tags": "الوسوم",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "أخبرنا المزيد:",
"Temperature": "درجة حرارة",
@ -545,6 +546,7 @@
"Update": "",
"Update and Copy Link": "تحديث ونسخ الرابط",
"Update password": "تحديث كلمة المرور",
"Updated at": "",
"Upload a GGUF model": "GGUF رفع موديل نوع",
"Upload Files": "تحميل الملفات",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "Система",
"System Prompt": "Системен Промпт",
"Tags": "Тагове",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Повече информация:",
"Temperature": "Температура",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Обнови и копирай връзка",
"Update password": "Обновяване на парола",
"Updated at": "",
"Upload a GGUF model": "Качване на GGUF модел",
"Upload Files": "Качване на файлове",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "সিস্টেম",
"System Prompt": "সিস্টেম প্রম্পট",
"Tags": "ট্যাগসমূহ",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "আরও বলুন:",
"Temperature": "তাপমাত্রা",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "আপডেট এবং লিংক কপি করুন",
"Update password": "পাসওয়ার্ড আপডেট করুন",
"Updated at": "",
"Upload a GGUF model": "একটি GGUF মডেল আপলোড করুন",
"Upload Files": "ফাইল আপলোড করুন",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Sistema",
"System Prompt": "Prompt del Sistema",
"Tags": "Etiquetes",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Dóna'ns més informació:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Actualitza i Copia enllaç",
"Update password": "Actualitza contrasenya",
"Updated at": "",
"Upload a GGUF model": "Puja un model GGUF",
"Upload Files": "Pujar fitxers",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "Sistema",
"System Prompt": "Madasig nga Sistema",
"Tags": "Mga tag",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "Temperatura",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "",
"Update password": "I-update ang password",
"Updated at": "",
"Upload a GGUF model": "Pag-upload ug modelo sa GGUF",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "System",
"System Prompt": "System-Prompt",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Erzähl uns mehr",
"Temperature": "Temperatur",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Erneuern und kopieren",
"Update password": "Passwort aktualisieren",
"Updated at": "",
"Upload a GGUF model": "GGUF Model hochladen",
"Upload Files": "Dateien hochladen",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "System very system",
"System Prompt": "System Prompt much prompt",
"Tags": "Tags very tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "Temperature very temp",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "",
"Update password": "Update password much change",
"Updated at": "",
"Upload a GGUF model": "Upload a GGUF model very upload",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "",
"System Prompt": "",
"Tags": "",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "",
"Update password": "",
"Updated at": "",
"Upload a GGUF model": "",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "",
"System Prompt": "",
"Tags": "",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "",
"Update password": "",
"Updated at": "",
"Upload a GGUF model": "",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Sistema",
"System Prompt": "Prompt del sistema",
"Tags": "Etiquetas",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Dinos más:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Actualizar y copiar enlace",
"Update password": "Actualizar contraseña",
"Updated at": "",
"Upload a GGUF model": "Subir un modelo GGUF",
"Upload Files": "Subir archivos",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "سیستم",
"System Prompt": "پرامپت سیستم",
"Tags": "تگ\u200cها",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "بیشتر بگویید:",
"Temperature": "دما",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "به روزرسانی و کپی لینک",
"Update password": "به روزرسانی رمزعبور",
"Updated at": "",
"Upload a GGUF model": "آپلود یک مدل GGUF",
"Upload Files": "بارگذاری پروندهها",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "Järjestelmä",
"System Prompt": "Järjestelmäkehote",
"Tags": "Tagit",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Kerro lisää:",
"Temperature": "Lämpötila",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Päivitä ja kopioi linkki",
"Update password": "Päivitä salasana",
"Updated at": "",
"Upload a GGUF model": "Lataa GGUF-malli",
"Upload Files": "Lataa tiedostoja",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Système",
"System Prompt": "Prompt Système",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Donnez-nous plus:",
"Temperature": "Température",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Mettre à jour et copier le lien",
"Update password": "Mettre à jour le mot de passe",
"Updated at": "",
"Upload a GGUF model": "Téléverser un modèle GGUF",
"Upload Files": "Téléverser des fichiers",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Système",
"System Prompt": "Prompt du Système",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Dites-nous en plus :",
"Temperature": "Température",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Mettre à Jour et Copier le Lien",
"Update password": "Mettre à Jour le Mot de Passe",
"Updated at": "",
"Upload a GGUF model": "Téléverser un modèle GGUF",
"Upload Files": "Téléverser des fichiers",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "מערכת",
"System Prompt": "תגובת מערכת",
"Tags": "תגיות",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "תרשמו יותר:",
"Temperature": "טמפרטורה",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "עדכן ושכפל קישור",
"Update password": "עדכן סיסמה",
"Updated at": "",
"Upload a GGUF model": "העלה מודל GGUF",
"Upload Files": "העלאת קבצים",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "सिस्टम",
"System Prompt": "सिस्टम प्रॉम्प्ट",
"Tags": "टैग",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "हमें और अधिक बताएँ:",
"Temperature": "टेंपेरेचर",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "अपडेट करें और लिंक कॉपी करें",
"Update password": "पासवर्ड अपडेट करें",
"Updated at": "",
"Upload a GGUF model": "GGUF मॉडल अपलोड करें",
"Upload Files": "फ़ाइलें अपलोड करें",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Sustav",
"System Prompt": "Sistemski prompt",
"Tags": "Oznake",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Recite nam više:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Ažuriraj i kopiraj vezu",
"Update password": "Ažuriraj lozinku",
"Updated at": "",
"Upload a GGUF model": "Učitaj GGUF model",
"Upload Files": "Prijenos datoteka",
"Upload Pipeline": "Prijenos kanala",

View File

@ -496,6 +496,7 @@
"System": "Sistema",
"System Prompt": "Prompt di sistema",
"Tags": "Tag",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Raccontaci di più:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Aggiorna e copia link",
"Update password": "Aggiorna password",
"Updated at": "",
"Upload a GGUF model": "Carica un modello GGUF",
"Upload Files": "Carica file",
"Upload Pipeline": "",

View File

@ -494,6 +494,7 @@
"System": "システム",
"System Prompt": "システムプロンプト",
"Tags": "タグ",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "もっと話してください:",
"Temperature": "温度",
@ -540,6 +541,7 @@
"Update": "",
"Update and Copy Link": "リンクの更新とコピー",
"Update password": "パスワードを更新",
"Updated at": "",
"Upload a GGUF model": "GGUF モデルをアップロード",
"Upload Files": "ファイルのアップロード",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "სისტემა",
"System Prompt": "სისტემური მოთხოვნა",
"Tags": "ტეგები",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "ჩვენთან დავუკავშირდით",
"Temperature": "ტემპერატურა",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "განახლება და ბმულის კოპირება",
"Update password": "პაროლის განახლება",
"Updated at": "",
"Upload a GGUF model": "GGUF მოდელის ატვირთვა",
"Upload Files": "ატვირთეთ ფაილები",
"Upload Pipeline": "",

View File

@ -494,6 +494,7 @@
"System": "시스템",
"System Prompt": "시스템 프롬프트",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "더 알려주세요:",
"Temperature": "Temperature",
@ -540,6 +541,7 @@
"Update": "",
"Update and Copy Link": "링크 업데이트 및 복사",
"Update password": "비밀번호 업데이트",
"Updated at": "",
"Upload a GGUF model": "GGUF 모델 업로드",
"Upload Files": "파일 업로드",
"Upload Pipeline": "",

View File

@ -497,6 +497,7 @@
"System": "Sistema",
"System Prompt": "Sistemos užklausa",
"Tags": "Žymos",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Papasakokite daugiau",
"Temperature": "Temperatūra",
@ -543,6 +544,7 @@
"Update": "",
"Update and Copy Link": "Atnaujinti ir kopijuoti nuorodą",
"Update password": "Atnaujinti slaptažodį",
"Updated at": "",
"Upload a GGUF model": "Parsisiųsti GGUF modelį",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "System",
"System Prompt": "Systemprompt",
"Tags": "Tagger",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Fortell oss mer:",
"Temperature": "Temperatur",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Oppdater og kopier lenke",
"Update password": "Oppdater passord",
"Updated at": "",
"Upload a GGUF model": "Last opp en GGUF-modell",
"Upload Files": "Last opp filer",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "Systeem",
"System Prompt": "Systeem Prompt",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Vertel ons meer:",
"Temperature": "Temperatuur",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Update en Kopieer Link",
"Update password": "Wijzig wachtwoord",
"Updated at": "",
"Upload a GGUF model": "Upload een GGUF model",
"Upload Files": "Bestanden uploaden",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "ਸਿਸਟਮ",
"System Prompt": "ਸਿਸਟਮ ਪ੍ਰੰਪਟ",
"Tags": "ਟੈਗ",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "ਸਾਨੂੰ ਹੋਰ ਦੱਸੋ:",
"Temperature": "ਤਾਪਮਾਨ",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "ਅੱਪਡੇਟ ਕਰੋ ਅਤੇ ਲਿੰਕ ਕਾਪੀ ਕਰੋ",
"Update password": "ਪਾਸਵਰਡ ਅੱਪਡੇਟ ਕਰੋ",
"Updated at": "",
"Upload a GGUF model": "ਇੱਕ GGUF ਮਾਡਲ ਅਪਲੋਡ ਕਰੋ",
"Upload Files": "ਫਾਇਲਾਂ ਅੱਪਲੋਡ ਕਰੋ",
"Upload Pipeline": "",

View File

@ -497,6 +497,7 @@
"System": "System",
"System Prompt": "Prompt systemowy",
"Tags": "Tagi",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Powiedz nam więcej",
"Temperature": "Temperatura",
@ -543,6 +544,7 @@
"Update": "",
"Update and Copy Link": "Uaktualnij i skopiuj link",
"Update password": "Aktualizacja hasła",
"Updated at": "",
"Upload a GGUF model": "Prześlij model GGUF",
"Upload Files": "Prześlij pliki",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Sistema",
"System Prompt": "Prompt do Sistema",
"Tags": "Tags",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Dê-nos mais:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Atualizar e Copiar Link",
"Update password": "Atualizar senha",
"Updated at": "",
"Upload a GGUF model": "Carregar um modelo GGUF",
"Upload Files": "Carregar arquivos",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Sistema",
"System Prompt": "Prompt do Sistema",
"Tags": "Etiquetas",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Diga-nos mais:",
"Temperature": "Temperatura",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Atualizar e Copiar Link",
"Update password": "Atualizar senha",
"Updated at": "",
"Upload a GGUF model": "Carregar um modelo GGUF",
"Upload Files": "Carregar ficheiros",
"Upload Pipeline": "Carregar Pipeline",

View File

@ -497,6 +497,7 @@
"System": "Система",
"System Prompt": "Системный промпт",
"Tags": "Теги",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Пожалуйста, расскажите нам больше:",
"Temperature": "Температура",
@ -543,6 +544,7 @@
"Update": "",
"Update and Copy Link": "Обновить и скопировать ссылку",
"Update password": "Обновить пароль",
"Updated at": "",
"Upload a GGUF model": "Загрузить модель GGUF",
"Upload Files": "Загрузка файлов",
"Upload Pipeline": "",

View File

@ -496,6 +496,7 @@
"System": "Систем",
"System Prompt": "Системски упит",
"Tags": "Ознаке",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Реците нам више:",
"Temperature": "Температура",
@ -542,6 +543,7 @@
"Update": "",
"Update and Copy Link": "Ажурирај и копирај везу",
"Update password": "Ажурирај лозинку",
"Updated at": "",
"Upload a GGUF model": "Отпреми GGUF модел",
"Upload Files": "Отпремање датотека",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "System",
"System Prompt": "Systeminstruktion",
"Tags": "Taggar",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Berätta mer:",
"Temperature": "Temperatur",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Uppdatera och kopiera länk",
"Update password": "Uppdatera lösenord",
"Updated at": "",
"Upload a GGUF model": "Ladda upp en GGUF-modell",
"Upload Files": "Ladda upp filer",
"Upload Pipeline": "Ladda upp rörledning",

View File

@ -495,6 +495,7 @@
"System": "",
"System Prompt": "",
"Tags": "",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "",
"Update password": "",
"Updated at": "",
"Upload a GGUF model": "",
"Upload Files": "",
"Upload Pipeline": "",

View File

@ -495,6 +495,7 @@
"System": "Sistem",
"System Prompt": "Sistem Promptu",
"Tags": "Etiketler",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Bize daha fazlasını anlat:",
"Temperature": "Temperature",
@ -541,6 +542,7 @@
"Update": "",
"Update and Copy Link": "Güncelle ve Bağlantıyı Kopyala",
"Update password": "Parolayı Güncelle",
"Updated at": "",
"Upload a GGUF model": "Bir GGUF modeli yükle",
"Upload Files": "Dosyaları Yükle",
"Upload Pipeline": "",

View File

@ -497,6 +497,7 @@
"System": "Система",
"System Prompt": "Системний промт",
"Tags": "Теги",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Розкажи нам більше:",
"Temperature": "Температура",
@ -543,6 +544,7 @@
"Update": "",
"Update and Copy Link": "Оновлення та копіювання посилання",
"Update password": "Оновити пароль",
"Updated at": "",
"Upload a GGUF model": "Завантажити GGUF модель",
"Upload Files": "Завантажити файли",
"Upload Pipeline": "Завантаження Pipeline",

View File

@ -494,6 +494,7 @@
"System": "Hệ thống",
"System Prompt": "Prompt Hệ thống (System Prompt)",
"Tags": "Thẻ",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Hãy cho chúng tôi hiểu thêm về chất lượng của câu trả lời:",
"Temperature": "Mức độ sáng tạo",
@ -540,6 +541,7 @@
"Update": "",
"Update and Copy Link": "Cập nhật và sao chép link",
"Update password": "Cập nhật mật khẩu",
"Updated at": "",
"Upload a GGUF model": "Tải lên mô hình GGUF",
"Upload Files": "Tải tệp lên máy chủ",
"Upload Pipeline": "",

View File

@ -494,6 +494,7 @@
"System": "系统",
"System Prompt": "系统提示词",
"Tags": "标签",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "请告诉我们更多细节",
"Temperature": "温度 (Temperature)",
@ -540,6 +541,7 @@
"Update": "",
"Update and Copy Link": "更新和复制链接",
"Update password": "更新密码",
"Updated at": "",
"Upload a GGUF model": "上传一个 GGUF 模型",
"Upload Files": "上传文件",
"Upload Pipeline": "上传 Pipeline",

View File

@ -494,6 +494,7 @@
"System": "系統",
"System Prompt": "系統提示詞",
"Tags": "標籤",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "告訴我們更多:",
"Temperature": "溫度",
@ -540,6 +541,7 @@
"Update": "",
"Update and Copy Link": "更新並複製連結",
"Update password": "更新密碼",
"Updated at": "",
"Upload a GGUF model": "上傳一個 GGUF 模型",
"Upload Files": "上傳文件",
"Upload Pipeline": "",

View File

@ -159,45 +159,65 @@
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto max-w-full">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-850 dark:text-gray-400">
<tr>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('role')}>
{$i18n.t('Role')}
{#if sortKey === 'role'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('role')}
>
{$i18n.t('Role')}
{#if sortKey === 'role'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('name')}>
{$i18n.t('Name')}
{#if sortKey === 'name'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('name')}
>
{$i18n.t('Name')}
{#if sortKey === 'name'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('email')}>
{$i18n.t('Email')}
{#if sortKey === 'email'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('email')}
>
{$i18n.t('Email')}
{#if sortKey === 'email'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('last_active_at')}>
{$i18n.t('Last Active')}
{#if sortKey === 'last_active_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('last_active_at')}
>
{$i18n.t('Last Active')}
{#if sortKey === 'last_active_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 cursor-pointer select-none" on:click={() => setSortKey('created_at')}>
{$i18n.t('Created at')}
{#if sortKey === 'created_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('created_at')}
>
{$i18n.t('Created at')}
{#if sortKey === 'created_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible"></span>
{/if}
</th>
<th scope="col" class="px-3 py-2 text-right" />
@ -213,7 +233,8 @@
const query = search.toLowerCase();
return name.includes(query);
}
}).sort((a, b) => {
})
.sort((a, b) => {
if (a[sortKey] < b[sortKey]) return sortOrder === 'asc' ? -1 : 1;
if (a[sortKey] > b[sortKey]) return sortOrder === 'asc' ? 1 : -1;
return 0;