From c3129da879e155ee93df0759978674ec2abdce22 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:28:34 +0200 Subject: [PATCH] [skip ci] Lint fix --- public/scripts/RossAscends-mods.js | 4 ++-- public/scripts/extensions/expressions/index.js | 2 +- public/scripts/nai-settings.js | 2 +- public/scripts/secrets.js | 2 +- src/endpoints/backends/chat-completions.js | 2 +- src/endpoints/novelai.js | 2 +- src/endpoints/secrets.js | 2 +- src/endpoints/vectors.js | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 476ce80ed..9f9585544 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -1132,7 +1132,7 @@ export function initRossMods() { .not('#right-nav-panel') .not('#floatingPrompt') .not('#cfgConfig') - .not("#logprobsViewer") + .not('#logprobsViewer') .is(':visible')) { let visibleDrawerContent = $('.drawer-content:visible') .not('#WorldInfo') @@ -1140,7 +1140,7 @@ export function initRossMods() { .not('#right-nav-panel') .not('#floatingPrompt') .not('#cfgConfig') - .not("#logprobsViewer"); + .not('#logprobsViewer'); $(visibleDrawerContent).parent().find('.drawer-icon').trigger('click'); return; } diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index f69ef2c09..9ed19a71f 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -1688,7 +1688,7 @@ async function fetchImagesNoCache() { // Pause Talkinghead to save resources when the ST tab is not visible or the window is minimized. // We currently do this via loading/unloading. Could be improved by adding new pause/unpause endpoints to Extras. - document.addEventListener("visibilitychange", function (event) { + document.addEventListener('visibilitychange', function (event) { let pageIsVisible; if (document.hidden) { console.debug('expressions: SillyTavern is now hidden'); diff --git a/public/scripts/nai-settings.js b/public/scripts/nai-settings.js index de0f503da..5fcc851e4 100644 --- a/public/scripts/nai-settings.js +++ b/public/scripts/nai-settings.js @@ -674,7 +674,7 @@ export function parseNovelAILogprobs(data) { // them with a logprob of -Infinity (0% probability) const notInAfter = befores .filter(([id]) => !afters.some(([aid]) => aid === id)) - .map(([id]) => [id, -Infinity]) + .map(([id]) => [id, -Infinity]); const merged = afters.concat(notInAfter); // Add the chosen token to `merged` if it's not already there. This can diff --git a/public/scripts/secrets.js b/public/scripts/secrets.js index 2e96136d3..7fb1ee464 100644 --- a/public/scripts/secrets.js +++ b/public/scripts/secrets.js @@ -17,7 +17,7 @@ export const SECRET_KEYS = { MISTRALAI: 'api_key_mistralai', TOGETHERAI: 'api_key_togetherai', CUSTOM: 'api_key_custom', - OOBA: 'api_key_ooba' + OOBA: 'api_key_ooba', }; const INPUT_MAP = { diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index b1a509b02..0f3bb1335 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -719,7 +719,7 @@ router.post('/generate', jsonParser, function (request, response) { // Adjust logprobs params for Chat Completions API, which expects { top_logprobs: number; logprobs: boolean; } if (!isTextCompletion && bodyParams.logprobs > 0) { bodyParams.top_logprobs = bodyParams.logprobs; - bodyParams.logprobs = true + bodyParams.logprobs = true; } if (getConfigValue('openai.randomizeUserId', false)) { diff --git a/src/endpoints/novelai.js b/src/endpoints/novelai.js index 7340b5087..a0dbeb459 100644 --- a/src/endpoints/novelai.js +++ b/src/endpoints/novelai.js @@ -216,7 +216,7 @@ router.post('/generate', jsonParser, async function (req, res) { } const data = await response.json(); - console.log("NovelAI Output", data?.output); + console.log('NovelAI Output', data?.output); return res.send(data); } } catch (error) { diff --git a/src/endpoints/secrets.js b/src/endpoints/secrets.js index 3236dc3a9..3014f3e69 100644 --- a/src/endpoints/secrets.js +++ b/src/endpoints/secrets.js @@ -29,7 +29,7 @@ const SECRET_KEYS = { TOGETHERAI: 'api_key_togetherai', MISTRALAI: 'api_key_mistralai', CUSTOM: 'api_key_custom', - OOBA: 'api_key_ooba' + OOBA: 'api_key_ooba', }; /** diff --git a/src/endpoints/vectors.js b/src/endpoints/vectors.js index 744169a7c..e50cc0bcf 100644 --- a/src/endpoints/vectors.js +++ b/src/endpoints/vectors.js @@ -172,7 +172,7 @@ function getSourceSettings(source, request) { const sourceSettings = { extrasUrl: extrasUrl, - extrasKey: extrasKey + extrasKey: extrasKey, }; return sourceSettings; }