From 3f37de699a9a05f535cf2b61990e43f1a500a18a Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Mon, 1 May 2023 16:56:27 +0200 Subject: [PATCH] Revert "#210 [OAI] Don't insert example dialogues without bots" This reverts commit 7b9e04258928ef80547cbcdca593fec773fa7fe9. --- public/scripts/openai.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 852994f5a..d636ca36a 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -183,13 +183,6 @@ function setOpenAIMessageExamples(mesExamplesArray) { // remove {Example Dialogue:} and replace \r\n with just \n let replaced = item.replace(//i, "{Example Dialogue:}").replace(/\r/gm, ''); let parsed = parseExampleIntoIndividual(replaced); - - // Discard example dialogue if there's not a single bot message in it - if (parsed.findIndex(x => x.name == "example_assistant") === -1) { - console.warn('Example dialogue without bot reply discarded:', replaced); - parsed = []; - } - // add to the example message blocks array openai_msgs_example.push(parsed); }