From b6d29d2980230e45bc1b3d46fd624b3b89b57d7b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:25:49 +0200 Subject: [PATCH] Return force /api append for Legacy ooba with relaxed URL off --- public/scripts/textgen-settings.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 294019f41..55e10c45f 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -153,6 +153,10 @@ function formatTextGenURL(value) { if (url.pathname === '/api' && !textgenerationwebui_settings.legacy_api) { toastr.info(`Enable compatibility mode or update ooba-webui to the latest version.`, 'Legacy API URL detected. Generation may fail.'); } + + if (!power_user.relaxed_api_urls && textgenerationwebui_settings.legacy_api && !isMancer()) { + url.pathname = '/api'; + } return url.toString(); } catch { } // Just using URL as a validation check return null;