From dfde45d365613766fb29b563eacfc1ac77636bf9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 2 Jan 2024 17:26:19 -0800 Subject: [PATCH 1/3] feat: set default models globally --- src/lib/apis/configs/index.ts | 2 +- src/lib/components/chat/ModelSelector.svelte | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/apis/configs/index.ts b/src/lib/apis/configs/index.ts index 9762c41f..76256f4d 100644 --- a/src/lib/apis/configs/index.ts +++ b/src/lib/apis/configs/index.ts @@ -4,7 +4,7 @@ export const setDefaultModels = async (token: string, models: string) => { let error = null; const res = await fetch(`${WEBUI_API_BASE_URL}/configs/default/models`, { - method: 'GET', + method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` diff --git a/src/lib/components/chat/ModelSelector.svelte b/src/lib/components/chat/ModelSelector.svelte index 9e7ff4dd..47afbbe1 100644 --- a/src/lib/components/chat/ModelSelector.svelte +++ b/src/lib/components/chat/ModelSelector.svelte @@ -1,12 +1,13 @@