Remove legacy API for Aphrodite
| @@ -1166,7 +1166,7 @@ async function getStatusTextgen() { | ||
| 1166 | 1166 | body: JSON.stringify({ |
| 1167 | 1167 | api_server: endpoint, |
| 1168 | 1168 | api_type: textgen_settings.type, |
| 1169 | 1169 | legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE), |
| 1170 | 1170 | }), |
| 1171 | 1171 | signal: abortStatusCheck.signal, |
| 1172 | 1172 | }); |
| @@ -3365,7 +3365,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 3365 | 3365 | if (main_api === 'textgenerationwebui' && |
| 3366 | 3366 | textgen_settings.streaming && |
| 3367 | 3367 | textgen_settings.legacy_api && |
| 3368 | 3368 | (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE)) { |
| 3369 | 3369 | toastr.error('Streaming is not supported for the Legacy API. Update Ooba and use new API to enable streaming.', undefined, { timeOut: 10000, preventDuplicates: true }); |
| 3370 | 3370 | unblockGeneration(type); |
| 3371 | 3371 | return Promise.resolve(); |
| @@ -321,7 +321,7 @@ async function selectPreset(name) { | ||
| 321 | 321 | function formatTextGenURL(value) { |
| 322 | 322 | try { |
| 323 | 323 | const noFormatTypes = [MANCER, TOGETHERAI, INFERMATICAI, DREAMGEN, OPENROUTER]; |
| 324 | 324 | const legacyApiTypes = [OOBA, APHRODITE]; |
| 325 | 325 | if (noFormatTypes.includes(settings.type)) { |
| 326 | 326 | return value; |
| 327 | 327 | } |
| @@ -1156,7 +1156,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, | ||
| 1156 | 1156 | 'banned_strings': banned_strings, |
| 1157 | 1157 | 'api_type': settings.type, |
| 1158 | 1158 | 'api_server': getTextGenServer(), |
| 1159 | 1159 | 'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE), |
| 1160 | 1160 | 'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined, |
| 1161 | 1161 | 'xtc_threshold': settings.xtc_threshold, |
| 1162 | 1162 | 'xtc_probability': settings.xtc_probability, |
| @@ -869,7 +869,7 @@ function getTextgenAPITokenizationParams(str) { | ||
| 869 | 869 | text: str, |
| 870 | 870 | api_type: textgen_settings.type, |
| 871 | 871 | url: getTextGenServer(), |
| 872 | 872 | legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE), |
| 873 | 873 | vllm_model: textgen_settings.vllm_model, |
| 874 | 874 | aphrodite_model: textgen_settings.aphrodite_model, |
| 875 | 875 | }; |