Merge branch 'staging' into completion-source-refactor

This commit is contained in:
Cohee 2023-12-04 00:22:02 +02:00
commit 7a58a095a4
1 changed files with 8 additions and 8 deletions

View File

@ -239,12 +239,12 @@ function getCustomTokenBans() {
return result.filter(onlyUnique).map(x => String(x)).join(',');
}
function loadTextGenSettings(data, settings) {
function loadTextGenSettings(data, loadedSettings) {
textgenerationwebui_presets = convertPresets(data.textgenerationwebui_presets);
textgenerationwebui_preset_names = data.textgenerationwebui_preset_names ?? [];
Object.assign(settings, settings.textgenerationwebui_settings ?? {});
Object.assign(settings, loadedSettings.textgenerationwebui_settings ?? {});
if (settings.api_use_mancer_webui) {
if (loadedSettings.api_use_mancer_webui) {
settings.type = MANCER;
}
@ -628,13 +628,13 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'grammar_string': settings.grammar_string,
};
let aphroditeFlags = {
'n': canMultiSwipe ? textgenerationwebui_settings.n : 1,
'best_of': canMultiSwipe ? textgenerationwebui_settings.n : 1,
'n': canMultiSwipe ? settings.n : 1,
'best_of': canMultiSwipe ? settings.n : 1,
'ignore_eos': settings.ignore_eos_token_aphrodite,
'spaces_between_special_tokens': settings.spaces_between_special_tokens_aphrodite,
//'logits_processors': textgenerationwebui_settings.logits_processors_aphrodite,
//'logprobs': textgenerationwebui_settings.log_probs_aphrodite,
//'prompt_logprobs': textgenerationwebui_settings.prompt_log_probs_aphrodite,
//'logits_processors': settings.logits_processors_aphrodite,
//'logprobs': settings.log_probs_aphrodite,
//'prompt_logprobs': settings.prompt_log_probs_aphrodite,
};
if (settings.type === textgen_types.APHRODITE) {
APIflags = Object.assign(APIflags, aphroditeFlags);