feat: add warning icon to images when some models are not vision capable

This commit is contained in:
Jun Siang Cheah 2024-05-19 18:57:13 +08:00
parent 4002ead6af
commit fa4c22492f
35 changed files with 61 additions and 2 deletions

View File

@ -653,7 +653,32 @@
{#each files as file, fileIdx} {#each files as file, fileIdx}
<div class=" relative group"> <div class=" relative group">
{#if file.type === 'image'} {#if file.type === 'image'}
<img src={file.url} alt="input" class=" h-16 w-16 rounded-xl object-cover" /> <div class="relative">
<img
src={file.url}
alt="input"
class=" h-16 w-16 rounded-xl object-cover"
/>
{#if visionCapableState === 'some'}
<Tooltip
className=" absolute top-0 left-0"
content={$i18n.t('A selected model does not support image input')}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-6 h-6 fill-yellow-300"
>
<path
fill-rule="evenodd"
d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"
clip-rule="evenodd"
/>
</svg>
</Tooltip>
{/if}
</div>
{:else if file.type === 'doc'} {:else if file.type === 'doc'}
<div <div
class="h-16 w-[15rem] flex items-center space-x-3 px-2.5 dark:bg-gray-600 rounded-xl border border-gray-200 dark:border-none" class="h-16 w-[15rem] flex items-center space-x-3 px-2.5 dark:bg-gray-600 rounded-xl border border-gray-200 dark:border-none"

View File

@ -5,6 +5,7 @@
export let placement = 'top'; export let placement = 'top';
export let content = `I'm a tooltip!`; export let content = `I'm a tooltip!`;
export let touch = true; export let touch = true;
export let className = 'flex';
let tooltipElement; let tooltipElement;
let tooltipInstance; let tooltipInstance;
@ -29,6 +30,6 @@
}); });
</script> </script>
<div bind:this={tooltipElement} aria-label={content} class="flex"> <div bind:this={tooltipElement} aria-label={content} class={className}>
<slot /> <slot />
</div> </div>

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} ...يفكر", "{{modelName}} is thinking...": "{{modelName}} ...يفكر",
"{{user}}'s Chats": "{{user}}' الدردشات", "{{user}}'s Chats": "{{user}}' الدردشات",
"{{webUIName}} Backend Required": "{{webUIName}} مطلوب", "{{webUIName}} Backend Required": "{{webUIName}} مطلوب",
"A selected model does not support image input": "",
"a user": "المستخدم", "a user": "المستخدم",
"About": "عن", "About": "عن",
"Account": "الحساب", "Account": "الحساب",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} мисли ...", "{{modelName}} is thinking...": "{{modelName}} мисли ...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Изисква се Бекенд", "{{webUIName}} Backend Required": "{{webUIName}} Изисква се Бекенд",
"A selected model does not support image input": "",
"a user": "потребител", "a user": "потребител",
"About": "Относно", "About": "Относно",
"Account": "Акаунт", "Account": "Акаунт",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} চিন্তা করছে...", "{{modelName}} is thinking...": "{{modelName}} চিন্তা করছে...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} ব্যাকএন্ড আবশ্যক", "{{webUIName}} Backend Required": "{{webUIName}} ব্যাকএন্ড আবশ্যক",
"A selected model does not support image input": "",
"a user": "একজন ব্যাবহারকারী", "a user": "একজন ব্যাবহারকারী",
"About": "সম্পর্কে", "About": "সম্পর্কে",
"Account": "একাউন্ট", "Account": "একাউন্ট",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} està pensant...", "{{modelName}} is thinking...": "{{modelName}} està pensant...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "Es requereix Backend de {{webUIName}}", "{{webUIName}} Backend Required": "Es requereix Backend de {{webUIName}}",
"A selected model does not support image input": "",
"a user": "un usuari", "a user": "un usuari",
"About": "Sobre", "About": "Sobre",
"Account": "Compte", "Account": "Compte",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} denkt nach...", "{{modelName}} is thinking...": "{{modelName}} denkt nach...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}}-Backend erforderlich", "{{webUIName}} Backend Required": "{{webUIName}}-Backend erforderlich",
"A selected model does not support image input": "",
"a user": "ein Benutzer", "a user": "ein Benutzer",
"About": "Über", "About": "Über",
"Account": "Account", "Account": "Account",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} is thinkin'...", "{{modelName}} is thinking...": "{{modelName}} is thinkin'...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Backend Much Required", "{{webUIName}} Backend Required": "{{webUIName}} Backend Much Required",
"A selected model does not support image input": "",
"a user": "such user", "a user": "such user",
"About": "Much About", "About": "Much About",
"Account": "Account", "Account": "Account",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "", "{{modelName}} is thinking...": "",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "", "{{webUIName}} Backend Required": "",
"A selected model does not support image input": "",
"a user": "", "a user": "",
"About": "", "About": "",
"Account": "", "Account": "",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "", "{{modelName}} is thinking...": "",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "", "{{webUIName}} Backend Required": "",
"A selected model does not support image input": "",
"a user": "", "a user": "",
"About": "", "About": "",
"Account": "", "Account": "",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{modelName}} is thinking...": "{{modelName}} está pensando...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Servidor Requerido", "{{webUIName}} Backend Required": "{{webUIName}} Servidor Requerido",
"A selected model does not support image input": "",
"a user": "un usuario", "a user": "un usuario",
"About": "Sobre nosotros", "About": "Sobre nosotros",
"Account": "Cuenta", "Account": "Cuenta",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} در حال فکر کردن است...", "{{modelName}} is thinking...": "{{modelName}} در حال فکر کردن است...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.", "{{webUIName}} Backend Required": "بکند {{webUIName}} نیاز است.",
"A selected model does not support image input": "",
"a user": "یک کاربر", "a user": "یک کاربر",
"About": "درباره", "About": "درباره",
"Account": "حساب کاربری", "Account": "حساب کاربری",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} miettii...", "{{modelName}} is thinking...": "{{modelName}} miettii...",
"{{user}}'s Chats": "{{user}}:n keskustelut", "{{user}}'s Chats": "{{user}}:n keskustelut",
"{{webUIName}} Backend Required": "{{webUIName}} backend vaaditaan", "{{webUIName}} Backend Required": "{{webUIName}} backend vaaditaan",
"A selected model does not support image input": "",
"a user": "käyttäjä", "a user": "käyttäjä",
"About": "Tietoja", "About": "Tietoja",
"Account": "Tili", "Account": "Tili",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} réfléchit...", "{{modelName}} is thinking...": "{{modelName}} réfléchit...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "Backend {{webUIName}} requis", "{{webUIName}} Backend Required": "Backend {{webUIName}} requis",
"A selected model does not support image input": "",
"a user": "un utilisateur", "a user": "un utilisateur",
"About": "À propos", "About": "À propos",
"Account": "Compte", "Account": "Compte",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} réfléchit...", "{{modelName}} is thinking...": "{{modelName}} réfléchit...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "Backend {{webUIName}} requis", "{{webUIName}} Backend Required": "Backend {{webUIName}} requis",
"A selected model does not support image input": "",
"a user": "un utilisateur", "a user": "un utilisateur",
"About": "À propos", "About": "À propos",
"Account": "Compte", "Account": "Compte",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} חושב...", "{{modelName}} is thinking...": "{{modelName}} חושב...",
"{{user}}'s Chats": "צ'אטים של {{user}}", "{{user}}'s Chats": "צ'אטים של {{user}}",
"{{webUIName}} Backend Required": "נדרש Backend של {{webUIName}}", "{{webUIName}} Backend Required": "נדרש Backend של {{webUIName}}",
"A selected model does not support image input": "",
"a user": "משתמש", "a user": "משתמש",
"About": "אודות", "About": "אודות",
"Account": "חשבון", "Account": "חשבון",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} सोच रहा है...", "{{modelName}} is thinking...": "{{modelName}} सोच रहा है...",
"{{user}}'s Chats": "{{user}} की चैट", "{{user}}'s Chats": "{{user}} की चैट",
"{{webUIName}} Backend Required": "{{webUIName}} बैकएंड आवश्यक", "{{webUIName}} Backend Required": "{{webUIName}} बैकएंड आवश्यक",
"A selected model does not support image input": "",
"a user": "एक उपयोगकर्ता", "a user": "एक उपयोगकर्ता",
"About": "हमारे बारे में", "About": "हमारे बारे में",
"Account": "खाता", "Account": "खाता",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} razmišlja...", "{{modelName}} is thinking...": "{{modelName}} razmišlja...",
"{{user}}'s Chats": "Razgovori korisnika {{user}}", "{{user}}'s Chats": "Razgovori korisnika {{user}}",
"{{webUIName}} Backend Required": "{{webUIName}} Backend je potreban", "{{webUIName}} Backend Required": "{{webUIName}} Backend je potreban",
"A selected model does not support image input": "",
"a user": "korisnik", "a user": "korisnik",
"About": "O", "About": "O",
"Account": "Račun", "Account": "Račun",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} sta pensando...", "{{modelName}} is thinking...": "{{modelName}} sta pensando...",
"{{user}}'s Chats": "{{user}} Chat", "{{user}}'s Chats": "{{user}} Chat",
"{{webUIName}} Backend Required": "{{webUIName}} Backend richiesto", "{{webUIName}} Backend Required": "{{webUIName}} Backend richiesto",
"A selected model does not support image input": "",
"a user": "un utente", "a user": "un utente",
"About": "Informazioni", "About": "Informazioni",
"Account": "Account", "Account": "Account",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} は思考中です...", "{{modelName}} is thinking...": "{{modelName}} は思考中です...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} バックエンドが必要です", "{{webUIName}} Backend Required": "{{webUIName}} バックエンドが必要です",
"A selected model does not support image input": "",
"a user": "ユーザー", "a user": "ユーザー",
"About": "概要", "About": "概要",
"Account": "アカウント", "Account": "アカウント",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} ფიქრობს...", "{{modelName}} is thinking...": "{{modelName}} ფიქრობს...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} საჭიროა ბექენდი", "{{webUIName}} Backend Required": "{{webUIName}} საჭიროა ბექენდი",
"A selected model does not support image input": "",
"a user": "მომხმარებელი", "a user": "მომხმარებელი",
"About": "შესახებ", "About": "შესახებ",
"Account": "ანგარიში", "Account": "ანგარიში",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} 이(가) 생각중입니다....", "{{modelName}} is thinking...": "{{modelName}} 이(가) 생각중입니다....",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} 백엔드가 필요합니다.", "{{webUIName}} Backend Required": "{{webUIName}} 백엔드가 필요합니다.",
"A selected model does not support image input": "",
"a user": "사용자", "a user": "사용자",
"About": "소개", "About": "소개",
"Account": "계정", "Account": "계정",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} is aan het denken...", "{{modelName}} is thinking...": "{{modelName}} is aan het denken...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Backend Verlpicht", "{{webUIName}} Backend Required": "{{webUIName}} Backend Verlpicht",
"A selected model does not support image input": "",
"a user": "een gebruiker", "a user": "een gebruiker",
"About": "Over", "About": "Over",
"Account": "Account", "Account": "Account",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} ਸੋਚ ਰਿਹਾ ਹੈ...", "{{modelName}} is thinking...": "{{modelName}} ਸੋਚ ਰਿਹਾ ਹੈ...",
"{{user}}'s Chats": "{{user}} ਦੀਆਂ ਗੱਲਾਂ", "{{user}}'s Chats": "{{user}} ਦੀਆਂ ਗੱਲਾਂ",
"{{webUIName}} Backend Required": "{{webUIName}} ਬੈਕਐਂਡ ਲੋੜੀਂਦਾ ਹੈ", "{{webUIName}} Backend Required": "{{webUIName}} ਬੈਕਐਂਡ ਲੋੜੀਂਦਾ ਹੈ",
"A selected model does not support image input": "",
"a user": "ਇੱਕ ਉਪਭੋਗਤਾ", "a user": "ਇੱਕ ਉਪਭੋਗਤਾ",
"About": "ਬਾਰੇ", "About": "ਬਾਰੇ",
"Account": "ਖਾਤਾ", "Account": "ਖਾਤਾ",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} myśli...", "{{modelName}} is thinking...": "{{modelName}} myśli...",
"{{user}}'s Chats": "{{user}} - czaty", "{{user}}'s Chats": "{{user}} - czaty",
"{{webUIName}} Backend Required": "Backend {{webUIName}} wymagane", "{{webUIName}} Backend Required": "Backend {{webUIName}} wymagane",
"A selected model does not support image input": "",
"a user": "użytkownik", "a user": "użytkownik",
"About": "O nas", "About": "O nas",
"Account": "Konto", "Account": "Konto",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{modelName}} is thinking...": "{{modelName}} está pensando...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário", "{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário",
"A selected model does not support image input": "",
"a user": "um usuário", "a user": "um usuário",
"About": "Sobre", "About": "Sobre",
"Account": "Conta", "Account": "Conta",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{modelName}} is thinking...": "{{modelName}} está pensando...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário", "{{webUIName}} Backend Required": "{{webUIName}} Backend Necessário",
"A selected model does not support image input": "",
"a user": "um usuário", "a user": "um usuário",
"About": "Sobre", "About": "Sobre",
"Account": "Conta", "Account": "Conta",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} думает...", "{{modelName}} is thinking...": "{{modelName}} думает...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} бэкенд требуемый", "{{webUIName}} Backend Required": "{{webUIName}} бэкенд требуемый",
"A selected model does not support image input": "",
"a user": "пользователь", "a user": "пользователь",
"About": "Об", "About": "Об",
"Account": "Аккаунт", "Account": "Аккаунт",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} размишља...", "{{modelName}} is thinking...": "{{modelName}} размишља...",
"{{user}}'s Chats": "Ћаскања корисника {{user}}", "{{user}}'s Chats": "Ћаскања корисника {{user}}",
"{{webUIName}} Backend Required": "Захтева се {{webUIName}} позадинац", "{{webUIName}} Backend Required": "Захтева се {{webUIName}} позадинац",
"A selected model does not support image input": "",
"a user": "корисник", "a user": "корисник",
"About": "О нама", "About": "О нама",
"Account": "Налог", "Account": "Налог",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} tänker...", "{{modelName}} is thinking...": "{{modelName}} tänker...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Backend krävs", "{{webUIName}} Backend Required": "{{webUIName}} Backend krävs",
"A selected model does not support image input": "",
"a user": "en användare", "a user": "en användare",
"About": "Om", "About": "Om",
"Account": "Konto", "Account": "Konto",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} düşünüyor...", "{{modelName}} is thinking...": "{{modelName}} düşünüyor...",
"{{user}}'s Chats": "{{user}} Sohbetleri", "{{user}}'s Chats": "{{user}} Sohbetleri",
"{{webUIName}} Backend Required": "{{webUIName}} Arkayüz Gerekli", "{{webUIName}} Backend Required": "{{webUIName}} Arkayüz Gerekli",
"A selected model does not support image input": "",
"a user": "bir kullanıcı", "a user": "bir kullanıcı",
"About": "Hakkında", "About": "Hakkında",
"Account": "Hesap", "Account": "Hesap",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} думає...", "{{modelName}} is thinking...": "{{modelName}} думає...",
"{{user}}'s Chats": "Чати {{user}}а", "{{user}}'s Chats": "Чати {{user}}а",
"{{webUIName}} Backend Required": "Необхідно підключення бекенду {{webUIName}}", "{{webUIName}} Backend Required": "Необхідно підключення бекенду {{webUIName}}",
"A selected model does not support image input": "",
"a user": "користувача", "a user": "користувача",
"About": "Про програму", "About": "Про програму",
"Account": "Обліковий запис", "Account": "Обліковий запис",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} đang suy nghĩ...", "{{modelName}} is thinking...": "{{modelName}} đang suy nghĩ...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "{{webUIName}} Yêu cầu Backend", "{{webUIName}} Backend Required": "{{webUIName}} Yêu cầu Backend",
"A selected model does not support image input": "",
"a user": "người sử dụng", "a user": "người sử dụng",
"About": "Giới thiệu", "About": "Giới thiệu",
"Account": "Tài khoản", "Account": "Tài khoản",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{modelName}} is thinking...": "{{modelName}} 正在思考...",
"{{user}}'s Chats": "{{user}} 的聊天记录", "{{user}}'s Chats": "{{user}} 的聊天记录",
"{{webUIName}} Backend Required": "需要 {{webUIName}} 后端", "{{webUIName}} Backend Required": "需要 {{webUIName}} 后端",
"A selected model does not support image input": "",
"a user": "用户", "a user": "用户",
"About": "关于", "About": "关于",
"Account": "账户", "Account": "账户",

View File

@ -6,6 +6,7 @@
"{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{modelName}} is thinking...": "{{modelName}} 正在思考...",
"{{user}}'s Chats": "", "{{user}}'s Chats": "",
"{{webUIName}} Backend Required": "需要 {{webUIName}} 後台", "{{webUIName}} Backend Required": "需要 {{webUIName}} 後台",
"A selected model does not support image input": "",
"a user": "使用者", "a user": "使用者",
"About": "關於", "About": "關於",
"Account": "帳號", "Account": "帳號",