From 75bb0d641f883dc7d2b40ba7b87910d64cf772cf Mon Sep 17 00:00:00 2001 From: 50h100a Date: Mon, 7 Aug 2023 16:46:12 -0400 Subject: [PATCH] Make 'relaxed api url' even more relaxed. --- public/scripts/kai-settings.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/scripts/kai-settings.js b/public/scripts/kai-settings.js index 49cdbeb33..5ca4f5a5b 100644 --- a/public/scripts/kai-settings.js +++ b/public/scripts/kai-settings.js @@ -39,14 +39,10 @@ const MIN_STREAMING_KCPPVERSION = '1.30'; function formatKoboldUrl(value) { try { const url = new URL(value); - if (power_user.relaxed_api_urls) { - if (url.pathname.endsWith('/api')) { - return url.toString(); - } - } else { + if (!power_user.relaxed_api_urls) { url.pathname = '/api'; - return url.toString(); } + return url.toString(); } catch { } // Try and Catch both fall through to the same return. return null; }