Return force /api append for Legacy ooba with relaxed URL off

This commit is contained in:
Cohee 2023-11-08 10:25:49 +02:00
parent e76c18c104
commit b6d29d2980
1 changed files with 4 additions and 0 deletions

View File

@ -153,6 +153,10 @@ function formatTextGenURL(value) {
if (url.pathname === '/api' && !textgenerationwebui_settings.legacy_api) { 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.'); 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(); return url.toString();
} catch { } // Just using URL as a validation check } catch { } // Just using URL as a validation check
return null; return null;