Return type casts where they were
| @@ -372,8 +372,8 @@ router.post('/generate', jsonParser, async function (request, response) { | ||
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | if (request.body.api_type === TEXTGEN_TYPES.OLLAMA) { |
| 375 | 375 | const keepAlive = Number(getConfigValue('ollama.keepAlive', -1, 'number')); |
| 376 | 376 | const numBatch = Number(getConfigValue('ollama.batchSize', -1, 'number')); |
| 377 | 377 | if (numBatch > 0) { |
| 378 | 378 | request.body['num_batch'] = numBatch; |
| 379 | 379 | } |
| @@ -24,7 +24,7 @@ import { importRisuSprites } from './sprites.js'; | ||
| 24 | 24 | const defaultAvatarPath = './public/img/ai4.png'; |
| 25 | 25 | |
| 26 | 26 | // KV-store for parsed character data |
| 27 | 27 | const cacheCapacity = Number(getConfigValue('cardsCacheCapacity', 100, 'number')); // MB |
| 28 | 28 | // With 100 MB limit it would take roughly 3000 characters to reach this limit |
| 29 | 29 | const characterDataCache = new MemoryLimitedMap(1024 * 1024 * cacheCapacity); |
| 30 | 30 | // Some Android devices require tighter memory management |
| @@ -19,9 +19,9 @@ import { | ||
| 19 | 19 | formatBytes, |
| 20 | 20 | } from '../util.js'; |
| 21 | 21 | |
| 22 | 22 | const isBackupEnabled = !!getConfigValue('backups.chat.enabled', true, 'boolean'); |
| 23 | 23 | const maxTotalChatBackups = Number(getConfigValue('backups.chat.maxTotalBackups', -1, 'number')); |
| 24 | 24 | const throttleInterval = Number(getConfigValue('backups.chat.throttleInterval', 10_000, 'number')); |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * Saves a chat to the backups directory. |
| @@ -11,9 +11,9 @@ import { jsonParser } from '../express-common.js'; | ||
| 11 | 11 | import { getAllUserHandles, getUserDirectories } from '../users.js'; |
| 12 | 12 | import { getFileNameValidationFunction } from '../middleware/validateFileName.js'; |
| 13 | 13 | |
| 14 | 14 | const ENABLE_EXTENSIONS = !!getConfigValue('extensions.enabled', true, 'boolean'); |
| 15 | 15 | const ENABLE_EXTENSIONS_AUTO_UPDATE = !!getConfigValue('extensions.autoUpdate', true, 'boolean'); |
| 16 | 16 | const ENABLE_ACCOUNTS = !!getConfigValue('enableUserAccounts', false, 'boolean'); |
| 17 | 17 | |
| 18 | 18 | // 10 minutes |
| 19 | 19 | const AUTOSAVE_INTERVAL = 10 * 60 * 1000; |
| @@ -7,8 +7,8 @@ import { default as git, CheckRepoActions } from 'simple-git'; | ||
| 7 | 7 | import { sync as commandExistsSync } from 'command-exists'; |
| 8 | 8 | import { getConfigValue, color } from './util.js'; |
| 9 | 9 | |
| 10 | 10 | const enableServerPlugins = !!getConfigValue('enableServerPlugins', false, 'boolean'); |
| 11 | 11 | const enableServerPluginsAutoUpdate = !!getConfigValue('enableServerPluginsAutoUpdate', true, 'boolean'); |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Map of loaded plugins. |