mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
[skip ci] Lint fix
This commit is contained in:
@ -1132,7 +1132,7 @@ export function initRossMods() {
|
|||||||
.not('#right-nav-panel')
|
.not('#right-nav-panel')
|
||||||
.not('#floatingPrompt')
|
.not('#floatingPrompt')
|
||||||
.not('#cfgConfig')
|
.not('#cfgConfig')
|
||||||
.not("#logprobsViewer")
|
.not('#logprobsViewer')
|
||||||
.is(':visible')) {
|
.is(':visible')) {
|
||||||
let visibleDrawerContent = $('.drawer-content:visible')
|
let visibleDrawerContent = $('.drawer-content:visible')
|
||||||
.not('#WorldInfo')
|
.not('#WorldInfo')
|
||||||
@ -1140,7 +1140,7 @@ export function initRossMods() {
|
|||||||
.not('#right-nav-panel')
|
.not('#right-nav-panel')
|
||||||
.not('#floatingPrompt')
|
.not('#floatingPrompt')
|
||||||
.not('#cfgConfig')
|
.not('#cfgConfig')
|
||||||
.not("#logprobsViewer");
|
.not('#logprobsViewer');
|
||||||
$(visibleDrawerContent).parent().find('.drawer-icon').trigger('click');
|
$(visibleDrawerContent).parent().find('.drawer-icon').trigger('click');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1688,7 +1688,7 @@ async function fetchImagesNoCache() {
|
|||||||
|
|
||||||
// Pause Talkinghead to save resources when the ST tab is not visible or the window is minimized.
|
// 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.
|
// 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;
|
let pageIsVisible;
|
||||||
if (document.hidden) {
|
if (document.hidden) {
|
||||||
console.debug('expressions: SillyTavern is now hidden');
|
console.debug('expressions: SillyTavern is now hidden');
|
||||||
|
@ -674,7 +674,7 @@ export function parseNovelAILogprobs(data) {
|
|||||||
// them with a logprob of -Infinity (0% probability)
|
// them with a logprob of -Infinity (0% probability)
|
||||||
const notInAfter = befores
|
const notInAfter = befores
|
||||||
.filter(([id]) => !afters.some(([aid]) => aid === id))
|
.filter(([id]) => !afters.some(([aid]) => aid === id))
|
||||||
.map(([id]) => [id, -Infinity])
|
.map(([id]) => [id, -Infinity]);
|
||||||
const merged = afters.concat(notInAfter);
|
const merged = afters.concat(notInAfter);
|
||||||
|
|
||||||
// Add the chosen token to `merged` if it's not already there. This can
|
// Add the chosen token to `merged` if it's not already there. This can
|
||||||
|
@ -17,7 +17,7 @@ export const SECRET_KEYS = {
|
|||||||
MISTRALAI: 'api_key_mistralai',
|
MISTRALAI: 'api_key_mistralai',
|
||||||
TOGETHERAI: 'api_key_togetherai',
|
TOGETHERAI: 'api_key_togetherai',
|
||||||
CUSTOM: 'api_key_custom',
|
CUSTOM: 'api_key_custom',
|
||||||
OOBA: 'api_key_ooba'
|
OOBA: 'api_key_ooba',
|
||||||
};
|
};
|
||||||
|
|
||||||
const INPUT_MAP = {
|
const INPUT_MAP = {
|
||||||
|
@ -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; }
|
// Adjust logprobs params for Chat Completions API, which expects { top_logprobs: number; logprobs: boolean; }
|
||||||
if (!isTextCompletion && bodyParams.logprobs > 0) {
|
if (!isTextCompletion && bodyParams.logprobs > 0) {
|
||||||
bodyParams.top_logprobs = bodyParams.logprobs;
|
bodyParams.top_logprobs = bodyParams.logprobs;
|
||||||
bodyParams.logprobs = true
|
bodyParams.logprobs = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getConfigValue('openai.randomizeUserId', false)) {
|
if (getConfigValue('openai.randomizeUserId', false)) {
|
||||||
|
@ -216,7 +216,7 @@ router.post('/generate', jsonParser, async function (req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log("NovelAI Output", data?.output);
|
console.log('NovelAI Output', data?.output);
|
||||||
return res.send(data);
|
return res.send(data);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -29,7 +29,7 @@ const SECRET_KEYS = {
|
|||||||
TOGETHERAI: 'api_key_togetherai',
|
TOGETHERAI: 'api_key_togetherai',
|
||||||
MISTRALAI: 'api_key_mistralai',
|
MISTRALAI: 'api_key_mistralai',
|
||||||
CUSTOM: 'api_key_custom',
|
CUSTOM: 'api_key_custom',
|
||||||
OOBA: 'api_key_ooba'
|
OOBA: 'api_key_ooba',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -172,7 +172,7 @@ function getSourceSettings(source, request) {
|
|||||||
|
|
||||||
const sourceSettings = {
|
const sourceSettings = {
|
||||||
extrasUrl: extrasUrl,
|
extrasUrl: extrasUrl,
|
||||||
extrasKey: extrasKey
|
extrasKey: extrasKey,
|
||||||
};
|
};
|
||||||
return sourceSettings;
|
return sourceSettings;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user