From 0b9555234efcb074bc864965f4abd893b3892c1b Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Fri, 24 Nov 2023 17:15:39 +0900 Subject: [PATCH] sort ChatCompletion presets by name --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 12375c627..f5db86f8b 100644 --- a/server.js +++ b/server.js @@ -121,7 +121,7 @@ if (fs.existsSync(whitelistPath)) { } const whitelistMode = config.whitelistMode; -const autorun = config.autorun && cliArguments.autorun!==false && !cliArguments.ssl; +const autorun = config.autorun && cliArguments.autorun !== false && !cliArguments.ssl; const enableExtensions = config.enableExtensions; const listen = config.listen; @@ -1697,7 +1697,7 @@ app.post('/getsettings', jsonParser, (request, response) => { // OpenAI Settings const { fileContents: openai_settings, fileNames: openai_setting_names } = readPresetsFromDirectory(DIRECTORIES.openAI_Settings, { - sortFunction: sortByModifiedDate(DIRECTORIES.openAI_Settings), removeFileExtension: true + sortFunction: sortByName(DIRECTORIES.openAI_Settings), removeFileExtension: true }); // TextGenerationWebUI Settings