Update third-party dependencies

This commit is contained in:
Cohee
2025-03-01 19:38:21 +02:00
parent b95dd04fbe
commit 743f07167c
3 changed files with 594 additions and 479 deletions

1013
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
{ {
"dependencies": { "dependencies": {
"@adobe/css-tools": "^4.4.0", "@adobe/css-tools": "^4.4.2",
"@agnai/sentencepiece-js": "^1.1.1", "@agnai/sentencepiece-js": "^1.1.1",
"@agnai/web-tokenizers": "^0.1.3", "@agnai/web-tokenizers": "^0.1.3",
"@iconfu/svg-inject": "^1.2.3", "@iconfu/svg-inject": "^1.2.3",
"@mozilla/readability": "^0.5.0", "@mozilla/readability": "^0.5.0",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"@zeldafan0225/ai_horde": "^5.1.0", "@zeldafan0225/ai_horde": "^5.2.0",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"bing-translate-api": "^4.0.2", "bing-translate-api": "^4.0.2",
"body-parser": "^1.20.2", "body-parser": "^1.20.2",
"bowser": "^2.11.0", "bowser": "^2.11.0",
"chalk": "^5.4.1", "chalk": "^5.4.1",
"command-exists": "^1.2.9", "command-exists": "^1.2.9",
"compression": "^1", "compression": "^1.8.0",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"cookie-session": "^2.1.0", "cookie-session": "^2.1.0",
"cors": "^2.8.5", "cors": "^2.8.5",
@ -22,18 +22,18 @@
"dompurify": "^3.2.4", "dompurify": "^3.2.4",
"droll": "^0.2.1", "droll": "^0.2.1",
"express": "^4.21.0", "express": "^4.21.0",
"form-data": "^4.0.0", "form-data": "^4.0.2",
"fuse.js": "^7.0.0", "fuse.js": "^7.1.0",
"google-translate-api-browser": "^3.0.1", "google-translate-api-browser": "^3.0.1",
"google-translate-api-x": "^10.7.1", "google-translate-api-x": "^10.7.2",
"handlebars": "^4.7.8", "handlebars": "^4.7.8",
"helmet": "^7.1.0", "helmet": "^7.2.0",
"highlight.js": "^11.10.0", "highlight.js": "^11.11.1",
"html-entities": "^2.5.2", "html-entities": "^2.5.2",
"iconv-lite": "^0.6.3", "iconv-lite": "^0.6.3",
"ip-matching": "^2.1.2", "ip-matching": "^2.1.2",
"ip-regex": "^5.0.0", "ip-regex": "^5.0.0",
"ipaddr.js": "^2.0.1", "ipaddr.js": "^2.2.0",
"is-docker": "^3.0.0", "is-docker": "^3.0.0",
"jimp": "^0.22.10", "jimp": "^0.22.10",
"localforage": "^1.10.0", "localforage": "^1.10.0",
@ -43,28 +43,28 @@
"morphdom": "^2.7.4", "morphdom": "^2.7.4",
"multer": "^1.4.5-lts.1", "multer": "^1.4.5-lts.1",
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"node-persist": "^4.0.1", "node-persist": "^4.0.4",
"open": "^8.4.2", "open": "^8.4.2",
"png-chunk-text": "^1.0.0", "png-chunk-text": "^1.0.0",
"png-chunks-encode": "^1.0.0", "png-chunks-encode": "^1.0.0",
"png-chunks-extract": "^1.0.0", "png-chunks-extract": "^1.0.0",
"proxy-agent": "^6.4.0", "proxy-agent": "^6.5.0",
"rate-limiter-flexible": "^5.0.0", "rate-limiter-flexible": "^5.0.5",
"response-time": "^2.3.2", "response-time": "^2.3.3",
"sanitize-filename": "^1.6.3", "sanitize-filename": "^1.6.3",
"seedrandom": "^3.0.5", "seedrandom": "^3.0.5",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sillytavern-transformers": "2.14.6", "sillytavern-transformers": "2.14.6",
"simple-git": "^3.19.1", "simple-git": "^3.27.0",
"slidetoggle": "^4.0.0", "slidetoggle": "^4.0.0",
"tiktoken": "^1.0.16", "tiktoken": "^1.0.20",
"url-join": "^5.0.0", "url-join": "^5.0.0",
"vectra": "^0.2.2", "vectra": "^0.2.2",
"wavefile": "^11.0.0", "wavefile": "^11.0.0",
"webpack": "^5.95.0", "webpack": "^5.98.0",
"write-file-atomic": "^5.0.1", "write-file-atomic": "^5.0.1",
"ws": "^8.17.1", "ws": "^8.18.1",
"yaml": "^2.3.4", "yaml": "^2.7.0",
"yargs": "^17.7.1", "yargs": "^17.7.1",
"yauzl": "^2.10.0" "yauzl": "^2.10.0"
}, },
@ -111,22 +111,22 @@
}, },
"main": "server.js", "main": "server.js",
"devDependencies": { "devDependencies": {
"@types/archiver": "^6.0.2", "@types/archiver": "^6.0.3",
"@types/command-exists": "^1.2.3", "@types/command-exists": "^1.2.3",
"@types/compression": "^1.7.5", "@types/compression": "^1.7.5",
"@types/cookie-parser": "^1.4.7", "@types/cookie-parser": "^1.4.8",
"@types/cookie-session": "^2.0.49", "@types/cookie-session": "^2.0.49",
"@types/cors": "^2.8.17", "@types/cors": "^2.8.17",
"@types/deno": "^2.0.0", "@types/deno": "^2.2.0",
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/jquery": "^3.5.29", "@types/jquery": "^3.5.32",
"@types/jquery-cropper": "^1.0.4", "@types/jquery-cropper": "^1.0.4",
"@types/jquery.transit": "^0.9.33", "@types/jquery.transit": "^0.9.33",
"@types/jqueryui": "^1.12.23", "@types/jqueryui": "^1.12.23",
"@types/lodash": "^4.17.10", "@types/lodash": "^4.17.16",
"@types/mime-types": "^2.1.4", "@types/mime-types": "^2.1.4",
"@types/multer": "^1.4.12", "@types/multer": "^1.4.12",
"@types/node": "^18.19.55", "@types/node": "^18.19.78",
"@types/node-persist": "^3.1.8", "@types/node-persist": "^3.1.8",
"@types/png-chunk-text": "^1.0.3", "@types/png-chunk-text": "^1.0.3",
"@types/png-chunks-encode": "^1.0.2", "@types/png-chunks-encode": "^1.0.2",
@ -137,6 +137,6 @@
"@types/write-file-atomic": "^4.0.3", "@types/write-file-atomic": "^4.0.3",
"@types/yargs": "^17.0.33", "@types/yargs": "^17.0.33",
"@types/yauzl": "^2.10.3", "@types/yauzl": "^2.10.3",
"eslint": "^8.57.0" "eslint": "^8.57.1"
} }
} }

View File

@ -398,15 +398,11 @@ function getWebTokenizersChunks(tokenizer, ids) {
* @returns {string} Tokenizer model to use * @returns {string} Tokenizer model to use
*/ */
export function getTokenizerModel(requestModel) { export function getTokenizerModel(requestModel) {
if (requestModel.includes('o1-preview') || requestModel.includes('o1-mini') || requestModel.includes('o3-mini')) { if (requestModel === 'o1' || requestModel.includes('o1-preview') || requestModel.includes('o1-mini') || requestModel.includes('o3-mini')) {
return 'gpt-4o'; return 'o1';
} }
if (requestModel.includes('gpt-4o')) { if (requestModel.includes('gpt-4o') || requestModel.includes('chatgpt-4o-latest')) {
return 'gpt-4o';
}
if (requestModel.includes('chatgpt-4o-latest')) {
return 'gpt-4o'; return 'gpt-4o';
} }