diff --git a/package-lock.json b/package-lock.json index c091c2615..a803cc4a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sillytavern", - "version": "1.9.2", + "version": "1.9.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sillytavern", - "version": "1.9.2", + "version": "1.9.3", "license": "AGPL-3.0", "dependencies": { "@dqbd/tiktoken": "^1.0.2", diff --git a/package.json b/package.json index c5761758f..05dcec7bf 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "type": "git", "url": "https://github.com/SillyTavern/SillyTavern.git" }, - "version": "1.9.2", + "version": "1.9.3", "scripts": { "start": "node server.js", "pkg": "pkg --compress Gzip --no-bytecode --public ." diff --git a/public/scripts/nai-settings.js b/public/scripts/nai-settings.js index 427c61563..0afe52b03 100644 --- a/public/scripts/nai-settings.js +++ b/public/scripts/nai-settings.js @@ -90,13 +90,6 @@ function loadNovelSettings(settings) { nai_settings.cfg_scale = settings.cfg_scale; nai_settings.streaming_novel = !!settings.streaming_novel; loadNovelSettingsUi(nai_settings); - - // reload the preset to migrate any new settings - for (const key of Object.keys(nai_settings)) { - if (typeof nai_settings[key] === 'number' && Number.isNaN(nai_settings[key])) { - $("#settings_perset_novel").trigger("change"); - } - } } const phraseRepPenStrings = [ diff --git a/server.js b/server.js index c768a4bfa..b20552344 100644 --- a/server.js +++ b/server.js @@ -3275,6 +3275,10 @@ app.post("/generate_openai", jsonParser, function (request, response_generate_op message = 'API key disabled or exhausted'; console.log(message); break; + case 451: + message = error?.response?.data?.error?.message || 'Unavailable for legal reasons'; + console.log(message); + break; } const quota_error = error?.response?.status === 429 && error?.response?.data?.error?.type === 'insufficient_quota';