From 404a217622a1570697138462ebe1220cf2b15209 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:49:35 +0200 Subject: [PATCH] Backfill imported bias entry ids --- public/scripts/openai.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 12ee4ce2d..c94a88541 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -3733,6 +3733,9 @@ async function onLogitBiasPresetImportFileChange(e) { if (typeof entry == 'object' && entry !== null) { if (Object.hasOwn(entry, 'text') && Object.hasOwn(entry, 'value')) { + if (!entry.id) { + entry.id = uuidv4(); + } validEntries.push(entry); } }