Clarify getstatus API

Instead of "version" and "koboldVersion", have "koboldUnitedVersion" and
"koboldCppVersion", the latter of which is null if we're not connected
to KoboldCpp.
This commit is contained in:
valadaptive
2023-12-10 20:34:11 -05:00
parent 1fbf4394c8
commit d33cb0d8d1
3 changed files with 56 additions and 66 deletions

View File

@ -901,17 +901,17 @@ async function getStatusKobold() {
const data = await response.json();
online_status = data?.result;
online_status = data?.model ?? 'no_connection';
if (!online_status) {
online_status = 'no_connection';
if (!data.koboldUnitedVersion) {
throw new Error('Missing mandatory Kobold version in data:', data);
}
// Determine instruct mode preset
autoSelectInstructPreset(online_status);
// determine if we can use stop sequence and streaming
setKoboldFlags(data.version, data.koboldVersion);
setKoboldFlags(data.koboldUnitedVersion, data.koboldCppVersion);
// We didn't get a 200 status code, but the endpoint has an explanation. Which means it DID connect, but I digress.
if (online_status === 'no_connection' && data.response) {