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
c6f9e744
Commit
c6f9e744
authored
Mar 24, 2024
by
Timothy J. Baek
Browse files
feat: external model icon
parent
302bd11b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
src/lib/components/chat/ModelSelector.svelte
src/lib/components/chat/ModelSelector.svelte
+2
-1
src/lib/components/chat/ModelSelector/Selector.svelte
src/lib/components/chat/ModelSelector/Selector.svelte
+20
-1
No files found.
src/lib/components/chat/ModelSelector.svelte
View file @
c6f9e744
...
@@ -45,7 +45,8 @@
...
@@ -45,7 +45,8 @@
.map((model) => ({
.map((model) => ({
value: model.id,
value: model.id,
label:
label:
model.name + `${model.size ? ` (${(model.size / 1024 ** 3).toFixed(1)}GB)` : ''}`
model.name + `${model.size ? ` (${(model.size / 1024 ** 3).toFixed(1)}GB)` : ''}`,
info: model
}))}
}))}
bind:value={selectedModel}
bind:value={selectedModel}
/>
/>
...
...
src/lib/components/chat/ModelSelector/Selector.svelte
View file @
c6f9e744
...
@@ -219,7 +219,26 @@
...
@@ -219,7 +219,26 @@
value={item.value}
value={item.value}
label={item.label}
label={item.label}
>
>
<div class="flex items-center gap-2">
<div class="line-clamp-1">
{item.label}
{item.label}
</div>
{#if item.info.external}
<div class=" mr-2">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
d="M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"
/>
</svg>
</div>
{/if}
</div>
{#if value === item.value}
{#if value === item.value}
<div class="ml-auto">
<div class="ml-auto">
...
...
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