From 87d73af0ac7e2c4fb5268fe221b0dce781d1c369 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:43:13 +0300 Subject: [PATCH] Mistral: Use hex toolid encoding --- src/prompt-converters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prompt-converters.js b/src/prompt-converters.js index 38a6854a9..a7e783a34 100644 --- a/src/prompt-converters.js +++ b/src/prompt-converters.js @@ -545,7 +545,7 @@ function convertMistralMessages(messages, charName = '', userName = '') { lastMsg.prefix = true; } - const sanitizeToolId = (id) => crypto.hash('sha512', id, 'base64').slice(0, 9); + const sanitizeToolId = (id) => crypto.hash('sha512', id, '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 => {