Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
fa4c2249
Commit
fa4c2249
authored
May 19, 2024
by
Jun Siang Cheah
Browse files
feat: add warning icon to images when some models are not vision capable
parent
4002ead6
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
46 additions
and
2 deletions
+46
-2
src/lib/components/chat/MessageInput.svelte
src/lib/components/chat/MessageInput.svelte
+26
-1
src/lib/components/common/Tooltip.svelte
src/lib/components/common/Tooltip.svelte
+2
-1
src/lib/i18n/locales/ar-BH/translation.json
src/lib/i18n/locales/ar-BH/translation.json
+1
-0
src/lib/i18n/locales/bg-BG/translation.json
src/lib/i18n/locales/bg-BG/translation.json
+1
-0
src/lib/i18n/locales/bn-BD/translation.json
src/lib/i18n/locales/bn-BD/translation.json
+1
-0
src/lib/i18n/locales/ca-ES/translation.json
src/lib/i18n/locales/ca-ES/translation.json
+1
-0
src/lib/i18n/locales/de-DE/translation.json
src/lib/i18n/locales/de-DE/translation.json
+1
-0
src/lib/i18n/locales/dg-DG/translation.json
src/lib/i18n/locales/dg-DG/translation.json
+1
-0
src/lib/i18n/locales/en-GB/translation.json
src/lib/i18n/locales/en-GB/translation.json
+1
-0
src/lib/i18n/locales/en-US/translation.json
src/lib/i18n/locales/en-US/translation.json
+1
-0
src/lib/i18n/locales/es-ES/translation.json
src/lib/i18n/locales/es-ES/translation.json
+1
-0
src/lib/i18n/locales/fa-IR/translation.json
src/lib/i18n/locales/fa-IR/translation.json
+1
-0
src/lib/i18n/locales/fi-FI/translation.json
src/lib/i18n/locales/fi-FI/translation.json
+1
-0
src/lib/i18n/locales/fr-CA/translation.json
src/lib/i18n/locales/fr-CA/translation.json
+1
-0
src/lib/i18n/locales/fr-FR/translation.json
src/lib/i18n/locales/fr-FR/translation.json
+1
-0
src/lib/i18n/locales/he-IL/translation.json
src/lib/i18n/locales/he-IL/translation.json
+1
-0
src/lib/i18n/locales/hi-IN/translation.json
src/lib/i18n/locales/hi-IN/translation.json
+1
-0
src/lib/i18n/locales/hr-HR/translation.json
src/lib/i18n/locales/hr-HR/translation.json
+1
-0
src/lib/i18n/locales/it-IT/translation.json
src/lib/i18n/locales/it-IT/translation.json
+1
-0
src/lib/i18n/locales/ja-JP/translation.json
src/lib/i18n/locales/ja-JP/translation.json
+1
-0
No files found.
src/lib/components/chat/MessageInput.svelte
View file @
fa4c2249
...
...
@@ -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"
...
...
src/lib/components/common/Tooltip.svelte
View file @
fa4c2249
...
...
@@ -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>
src/lib/i18n/locales/ar-BH/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"الحساب"
,
...
...
src/lib/i18n/locales/bg-BG/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"Акаунт"
,
...
...
src/lib/i18n/locales/bn-BD/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"একাউন্ট"
,
...
...
src/lib/i18n/locales/ca-ES/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/de-DE/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/dg-DG/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/en-GB/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
""
,
...
...
src/lib/i18n/locales/en-US/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
""
,
...
...
src/lib/i18n/locales/es-ES/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/fa-IR/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"حساب کاربری"
,
...
...
src/lib/i18n/locales/fi-FI/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/fr-CA/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/fr-FR/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/he-IL/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"חשבון"
,
...
...
src/lib/i18n/locales/hi-IN/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"खाता"
,
...
...
src/lib/i18n/locales/hr-HR/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/it-IT/translation.json
View file @
fa4c2249
...
...
@@ -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"
,
...
...
src/lib/i18n/locales/ja-JP/translation.json
View file @
fa4c2249
...
...
@@ -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"
:
"アカウント"
,
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment