mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-12 01:50:11 +01:00
make KAI url-fixing as flexible as webUI's
This commit is contained in:
parent
ea809023b5
commit
2d07cce1dd
@ -35,13 +35,12 @@ const MIN_STREAMING_KCPPVERSION = '1.30';
|
||||
function formatKoboldUrl(value) {
|
||||
try {
|
||||
const url = new URL(value);
|
||||
url.pathname = '/api';
|
||||
if (url.pathname.endsWith('/api')) {
|
||||
return url.toString();
|
||||
}
|
||||
catch {
|
||||
} catch { } // Try and Catch both fall through to the same return.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function loadKoboldSettings(preset) {
|
||||
for (const name of Object.keys(kai_settings)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user