mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: external tools server support
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { createEventDispatcher, onMount, getContext, tick } from 'svelte';
|
||||
import { getModels as _getModels } from '$lib/apis';
|
||||
import { getModels as _getModels, getToolServersData } from '$lib/apis';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
import { models, settings, user } from '$lib/stores';
|
||||
import { models, settings, toolServers, user } from '$lib/stores';
|
||||
|
||||
import Switch from '$lib/components/common/Switch.svelte';
|
||||
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||
@@ -30,6 +30,8 @@
|
||||
await saveSettings({
|
||||
toolServers: servers
|
||||
});
|
||||
|
||||
toolServers.set(await getToolServersData($settings?.toolServers ?? []));
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
|
||||
Reference in New Issue
Block a user