forked from open-webui/open-webui
fix: chat general
This commit is contained in:
parent
cb93038abf
commit
092884fec5
4 changed files with 20 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { models, showSettings, settings } from '$lib/stores';
|
||||
import { onMount, tick } from 'svelte';
|
||||
import toast from 'svelte-french-toast';
|
||||
|
||||
export let selectedModels = [''];
|
||||
|
@ -15,6 +16,12 @@
|
|||
localStorage.setItem('settings', JSON.stringify($settings));
|
||||
toast.success('Default model updated');
|
||||
};
|
||||
|
||||
$: if (selectedModels.length > 0 && $models.length > 0) {
|
||||
selectedModels = selectedModels.map((model) =>
|
||||
$models.map((m) => m.name).includes(model) ? model : ''
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col my-2">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue