Return type casts where they were

861c502e4472be977f608adb1b0f850c312143ef

Cohee <18619528+Cohee1207@users.noreply.github.com>

5 files changed, +11 -11Ignore whitespace
src/endpoints/backends/text-completions.js+2 -2
@@ -372,8 +372,8 @@ router.post('/generate', jsonParser, async function (request, response) {
372372 }
373373
374374 if (request.body.api_type === TEXTGEN_TYPES.OLLAMA) {
375375 const keepAlive = Number(getConfigValue('ollama.keepAlive', -1, 'number'));
376376 const numBatch = Number(getConfigValue('ollama.batchSize', -1, 'number'));
377377 if (numBatch > 0) {
378378 request.body['num_batch'] = numBatch;
379379 }
src/endpoints/characters.js+1 -1
@@ -24,7 +24,7 @@ import { importRisuSprites } from './sprites.js';
2424const defaultAvatarPath = './public/img/ai4.png';
2525
2626// KV-store for parsed character data
2727const cacheCapacity = Number(getConfigValue('cardsCacheCapacity', 100, 'number')); // MB
2828// With 100 MB limit it would take roughly 3000 characters to reach this limit
2929const characterDataCache = new MemoryLimitedMap(1024 * 1024 * cacheCapacity);
3030// Some Android devices require tighter memory management
src/endpoints/chats.js+3 -3
@@ -19,9 +19,9 @@ import {
1919 formatBytes,
2020} from '../util.js';
2121
2222const isBackupEnabled = !!getConfigValue('backups.chat.enabled', true, 'boolean');
2323const maxTotalChatBackups = Number(getConfigValue('backups.chat.maxTotalBackups', -1, 'number'));
2424const throttleInterval = Number(getConfigValue('backups.chat.throttleInterval', 10_000, 'number'));
2525
2626/**
2727 * Saves a chat to the backups directory.
src/endpoints/settings.js+3 -3
@@ -11,9 +11,9 @@ import { jsonParser } from '../express-common.js';
1111import { getAllUserHandles, getUserDirectories } from '../users.js';
1212import { getFileNameValidationFunction } from '../middleware/validateFileName.js';
1313
1414const ENABLE_EXTENSIONS = !!getConfigValue('extensions.enabled', true, 'boolean');
1515const ENABLE_EXTENSIONS_AUTO_UPDATE = !!getConfigValue('extensions.autoUpdate', true, 'boolean');
1616const ENABLE_ACCOUNTS = !!getConfigValue('enableUserAccounts', false, 'boolean');
1717
1818// 10 minutes
1919const AUTOSAVE_INTERVAL = 10 * 60 * 1000;
src/plugin-loader.js+2 -2
@@ -7,8 +7,8 @@ import { default as git, CheckRepoActions } from 'simple-git';
77import { sync as commandExistsSync } from 'command-exists';
88import { getConfigValue, color } from './util.js';
99
1010const enableServerPlugins = !!getConfigValue('enableServerPlugins', false, 'boolean');
1111const enableServerPluginsAutoUpdate = !!getConfigValue('enableServerPluginsAutoUpdate', true, 'boolean');
1212
1313/**
1414 * Map of loaded plugins.