From b62fa706f1bebc5acc0ea923a423423ad1997ab4 Mon Sep 17 00:00:00 2001 From: Bing Wen Tan Date: Sat, 14 Oct 2023 12:02:36 +0800 Subject: [PATCH] moved up SIT return for genAI --- functions/src/definitions/common/genAI.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/src/definitions/common/genAI.ts b/functions/src/definitions/common/genAI.ts index fc207e66..84fa0e66 100644 --- a/functions/src/definitions/common/genAI.ts +++ b/functions/src/definitions/common/genAI.ts @@ -72,7 +72,9 @@ async function rationaliseMessage(message: string, category: string) { if (category.includes("irrelevant") || category === "unsure") { return null } - + if (env === "SIT") { + return "This is a rationalisation" + } let meaningfulLength: number = 300 switch (category) { case "illicit": @@ -93,9 +95,6 @@ async function rationaliseMessage(message: string, category: string) { //don't bother with rationalisation if remaining message is too short to be meaningful. return null } - if (env === "SIT") { - return "This is a rationalisation" - } try { const rationalisationHyperparameters = hyperparameters?.rationalisation const model: string = rationalisationHyperparameters.model