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}
<div class=" relative group">
{#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'}
<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"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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