refac: connections

This commit is contained in:
Timothy Jaeryang Baek
2025-02-11 23:21:09 -08:00
parent 689317c5b5
commit 862b5a947a
3 changed files with 110 additions and 84 deletions
+7 -3
View File
@@ -20,7 +20,9 @@
export let show = false;
export let edit = false;
export let ollama = false;
export let direct = false;
export let connection = null;
@@ -46,9 +48,11 @@
};
const verifyOpenAIHandler = async () => {
const res = await verifyOpenAIConnection(localStorage.token, url, key).catch((error) => {
toast.error(`${error}`);
});
const res = await verifyOpenAIConnection(localStorage.token, url, key, direct).catch(
(error) => {
toast.error(`${error}`);
}
);
if (res) {
toast.success($i18n.t('Server connection verified'));