TextGenWebUI: remove legacy API mode

This commit is contained in:
Cohee
2024-10-15 00:32:56 +03:00
parent 8986cb0039
commit 24884b3206
22 changed files with 86 additions and 172 deletions

View File

@@ -1184,7 +1184,6 @@ async function getStatusTextgen() {
body: JSON.stringify({
api_server: endpoint,
api_type: textgen_settings.type,
legacy_api: textgen_settings.legacy_api && textgen_settings.type === OOBA,
}),
signal: abortStatusCheck.signal,
});
@@ -3447,15 +3446,6 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
return Promise.resolve();
}
if (main_api === 'textgenerationwebui' &&
textgen_settings.streaming &&
textgen_settings.legacy_api &&
textgen_settings.type === OOBA) {
toastr.error(t`Streaming is not supported for the Legacy API. Update Ooba and use new API to enable streaming.`, undefined, { timeOut: 10000, preventDuplicates: true });
unblockGeneration(type);
return Promise.resolve();
}
if (isHordeGenerationNotAllowed()) {
unblockGeneration(type);
return Promise.resolve();