Remove legacy API for Aphrodite

2478e17164c1d57ac4b1862faa1bd01178ef7124

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +5 -5Ignore whitespace
public/script.js+2 -2
@@ -1166,7 +1166,7 @@ async function getStatusTextgen() {
11661166 body: JSON.stringify({
11671167 api_server: endpoint,
11681168 api_type: textgen_settings.type,
11691169 legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE),
11701170 }),
11711171 signal: abortStatusCheck.signal,
11721172 });
@@ -3365,7 +3365,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
33653365 if (main_api === 'textgenerationwebui' &&
33663366 textgen_settings.streaming &&
33673367 textgen_settings.legacy_api &&
33683368 (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE)) {
33693369 toastr.error('Streaming is not supported for the Legacy API. Update Ooba and use new API to enable streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
33703370 unblockGeneration(type);
33713371 return Promise.resolve();
public/scripts/textgen-settings.js+2 -2
@@ -321,7 +321,7 @@ async function selectPreset(name) {
321321function formatTextGenURL(value) {
322322 try {
323323 const noFormatTypes = [MANCER, TOGETHERAI, INFERMATICAI, DREAMGEN, OPENROUTER];
324324 const legacyApiTypes = [OOBA, APHRODITE];
325325 if (noFormatTypes.includes(settings.type)) {
326326 return value;
327327 }
@@ -1156,7 +1156,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
11561156 'banned_strings': banned_strings,
11571157 'api_type': settings.type,
11581158 'api_server': getTextGenServer(),
11591159 'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE),
11601160 'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
11611161 'xtc_threshold': settings.xtc_threshold,
11621162 'xtc_probability': settings.xtc_probability,
public/scripts/tokenizers.js+1 -1
@@ -869,7 +869,7 @@ function getTextgenAPITokenizationParams(str) {
869869 text: str,
870870 api_type: textgen_settings.type,
871871 url: getTextGenServer(),
872872 legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE),
873873 vllm_model: textgen_settings.vllm_model,
874874 aphrodite_model: textgen_settings.aphrodite_model,
875875 };