| @@ -43,7 +43,6 @@ | ||
| 43 | 43 | "ip-matching": "^2.1.2", |
| 44 | 44 | "ipaddr.js": "^2.0.1", |
| 45 | 45 | "jimp": "^0.22.10", |
| 46 | - "js-sha256": "^0.11.0", | |
| 47 | 46 | "localforage": "^1.10.0", |
| 48 | 47 | "lodash": "^4.17.21", |
| 49 | 48 | "mime-types": "^2.1.35", |
| @@ -4883,12 +4882,6 @@ | ||
| 4883 | 4882 | "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==", |
| 4884 | 4883 | "license": "BSD-3-Clause" |
| 4885 | 4884 | }, |
| 4886 | - "node_modules/js-sha256": { | |
| 4887 | - "version": "0.11.0", | |
| 4888 | - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.11.0.tgz", | |
| 4889 | - "integrity": "sha512-6xNlKayMZvds9h1Y1VWc0fQHQ82BxTXizWPEtEeGvmOUYpBRy4gbWroHLpzowe6xiQhHpelCQiE7HEdznyBL9Q==", | |
| 4890 | - "license": "MIT" | |
| 4891 | - }, | |
| 4892 | 4885 | "node_modules/js-yaml": { |
| 4893 | 4886 | "version": "4.1.0", |
| 4894 | 4887 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", |
| @@ -33,7 +33,6 @@ | ||
| 33 | 33 | "ip-matching": "^2.1.2", |
| 34 | 34 | "ipaddr.js": "^2.0.1", |
| 35 | 35 | "jimp": "^0.22.10", |
| 36 | - "js-sha256": "^0.11.0", | |
| 37 | 36 | "localforage": "^1.10.0", |
| 38 | 37 | "lodash": "^4.17.21", |
| 39 | 38 | "mime-types": "^2.1.35", |
| @@ -16,7 +16,7 @@ import { | ||
| 16 | 16 | } from '../../constants.js'; |
| 17 | 17 | import { forwardFetchResponse, trimV1, getConfigValue } from '../../util.js'; |
| 18 | 18 | import { setAdditionalHeaders } from '../../additional-headers.js'; |
| 19 | 19 | import { sha256createHash } from 'js-sha256crypto'; |
| 20 | 20 | |
| 21 | 21 | export const router = express.Router(); |
| 22 | 22 | |
| @@ -261,7 +261,7 @@ router.post('/chat_template', jsonParser, async function (request, response) { | ||
| 261 | 261 | |
| 262 | 262 | /** @type {any} */ |
| 263 | 263 | const chatTemplate = await chatTemplateReply.json(); |
| 264 | 264 | chatTemplate['chat_template_hash'] = sha256.createcreateHash('sha256').update(chatTemplate['chat_template']).hexdigest('hex'); |
| 265 | 265 | return response.send(chatTemplate); |
| 266 | 266 | } catch (error) { |
| 267 | 267 | console.error(error); |