Make textgen settings type checks more concise

This commit is contained in:
valadaptive
2023-12-03 10:03:19 -05:00
parent 047c897ead
commit 9c33ddbafc
6 changed files with 109 additions and 106 deletions

View File

@ -22,7 +22,7 @@ import { context_presets, getContextSettings, power_user } from './power-user.js
import {
textgenerationwebui_preset_names,
textgenerationwebui_presets,
textgenerationwebui_settings,
textgenerationwebui_settings as textgen_settings,
} from './textgen-settings.js';
import { download, parseJsonFile, waitUntilCondition } from './utils.js';
@ -236,7 +236,7 @@ class PresetManager {
case 'novel':
return nai_settings;
case 'textgenerationwebui':
return textgenerationwebui_settings;
return textgen_settings;
case 'context': {
const context_preset = getContextSettings();
context_preset['name'] = name || power_user.context.preset;