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