From 499d158c11136c8649c7bb3eb75dcdd31de2f54c Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sat, 9 Dec 2023 20:55:34 -0500 Subject: [PATCH] Remove last usage of getAPIServerUrl Now that we're not using this in the tokenizers code, we can remove it. --- public/script.js | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/public/script.js b/public/script.js index 81bed0af0..da754aa5f 100644 --- a/public/script.js +++ b/public/script.js @@ -871,7 +871,7 @@ async function getStatusKobold() { const url = '/getstatus'; - let endpoint = getAPIServerUrl(); + let endpoint = api_server; if (!endpoint) { console.warn('No endpoint for status check'); @@ -919,7 +919,9 @@ async function getStatusKobold() { async function getStatusTextgen() { const url = '/api/textgenerationwebui/status'; - let endpoint = getAPIServerUrl(); + let endpoint = textgen_settings.type === MANCER ? + MANCER_SERVER : + api_server_textgenerationwebui; if (!endpoint) { console.warn('No endpoint for status check'); @@ -999,23 +1001,6 @@ export function resultCheckStatus() { stopStatusLoading(); } -// TODO(valadaptive): remove the usage of this function in the tokenizers code, then remove the function entirely -export function getAPIServerUrl() { - if (main_api == 'textgenerationwebui') { - if (textgen_settings.type === MANCER) { - return MANCER_SERVER; - } - - return api_server_textgenerationwebui; - } - - if (main_api == 'kobold') { - return api_server; - } - - return ''; -} - export async function selectCharacterById(id) { if (characters[id] == undefined) { return;