mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-07 15:11:57 +01:00
Use classic hash method for Node 18
This commit is contained in:
parent
87d73af0ac
commit
67ebf0fc06
@ -545,7 +545,7 @@ function convertMistralMessages(messages, charName = '', userName = '') {
|
||||
lastMsg.prefix = true;
|
||||
}
|
||||
|
||||
const sanitizeToolId = (id) => crypto.hash('sha512', id, 'hex').slice(0, 9);
|
||||
const sanitizeToolId = (id) => crypto.createHash('sha512').update(id).digest('hex').slice(0, 9);
|
||||
|
||||
// Doesn't support completion names, so prepend if not already done by the frontend (e.g. for group chats).
|
||||
messages.forEach(msg => {
|
||||
|
Loading…
Reference in New Issue
Block a user