mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Remove legacy API for Aphrodite
This commit is contained in:
parent
1fe4a230fe
commit
2478e17164
@ -1166,7 +1166,7 @@ async function getStatusTextgen() {
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
api_server: endpoint,
|
api_server: endpoint,
|
||||||
api_type: textgen_settings.type,
|
api_type: textgen_settings.type,
|
||||||
legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE),
|
legacy_api: textgen_settings.legacy_api && textgen_settings.type === OOBA,
|
||||||
}),
|
}),
|
||||||
signal: abortStatusCheck.signal,
|
signal: abortStatusCheck.signal,
|
||||||
});
|
});
|
||||||
@ -3365,7 +3365,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
|||||||
if (main_api === 'textgenerationwebui' &&
|
if (main_api === 'textgenerationwebui' &&
|
||||||
textgen_settings.streaming &&
|
textgen_settings.streaming &&
|
||||||
textgen_settings.legacy_api &&
|
textgen_settings.legacy_api &&
|
||||||
(textgen_settings.type === OOBA || textgen_settings.type === APHRODITE)) {
|
textgen_settings.type === OOBA) {
|
||||||
toastr.error('Streaming is not supported for the Legacy API. Update Ooba and use new API to enable streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
|
toastr.error('Streaming is not supported for the Legacy API. Update Ooba and use new API to enable streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
|
||||||
unblockGeneration(type);
|
unblockGeneration(type);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
@ -321,7 +321,7 @@ async function selectPreset(name) {
|
|||||||
function formatTextGenURL(value) {
|
function formatTextGenURL(value) {
|
||||||
try {
|
try {
|
||||||
const noFormatTypes = [MANCER, TOGETHERAI, INFERMATICAI, DREAMGEN, OPENROUTER];
|
const noFormatTypes = [MANCER, TOGETHERAI, INFERMATICAI, DREAMGEN, OPENROUTER];
|
||||||
const legacyApiTypes = [OOBA, APHRODITE];
|
const legacyApiTypes = [OOBA];
|
||||||
if (noFormatTypes.includes(settings.type)) {
|
if (noFormatTypes.includes(settings.type)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -1156,7 +1156,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||||||
'banned_strings': banned_strings,
|
'banned_strings': banned_strings,
|
||||||
'api_type': settings.type,
|
'api_type': settings.type,
|
||||||
'api_server': getTextGenServer(),
|
'api_server': getTextGenServer(),
|
||||||
'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE),
|
'legacy_api': settings.legacy_api && settings.type === OOBA,
|
||||||
'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
|
'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
|
||||||
'xtc_threshold': settings.xtc_threshold,
|
'xtc_threshold': settings.xtc_threshold,
|
||||||
'xtc_probability': settings.xtc_probability,
|
'xtc_probability': settings.xtc_probability,
|
||||||
|
@ -869,7 +869,7 @@ function getTextgenAPITokenizationParams(str) {
|
|||||||
text: str,
|
text: str,
|
||||||
api_type: textgen_settings.type,
|
api_type: textgen_settings.type,
|
||||||
url: getTextGenServer(),
|
url: getTextGenServer(),
|
||||||
legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE),
|
legacy_api: textgen_settings.legacy_api && textgen_settings.type === OOBA,
|
||||||
vllm_model: textgen_settings.vllm_model,
|
vllm_model: textgen_settings.vllm_model,
|
||||||
aphrodite_model: textgen_settings.aphrodite_model,
|
aphrodite_model: textgen_settings.aphrodite_model,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user