From 7b3e0c1db299c27acab1eb68834f8780200d7e89 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 16 Apr 2023 16:22:57 +0200 Subject: [PATCH] Removing post proceess of output --- llamabot.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/llamabot.js b/llamabot.js index 937efd9..7eca1b0 100644 --- a/llamabot.js +++ b/llamabot.js @@ -190,12 +190,10 @@ async function generateResponse(conversation) { console.log(JSON.stringify(responseData)) const choice = responseData.choices[0]; - // Remove "user None:" and any text after it from the response - const responseText = choice.message.content.trim(); - const startIndex = responseText.indexOf('user None:'); - const sanitizedResponse = startIndex === -1 ? responseText : responseText.substring(0, startIndex); - - return sanitizedResponse; + const responseText = choice.message.content + + return responseText; + } catch (err) { throw err; } finally {