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