From fb4b16e46c9282342befe63d113c1f0300b9a84c Mon Sep 17 00:00:00 2001 From: Sweaterdog Date: Tue, 11 Feb 2025 21:21:26 -0800 Subject: [PATCH] Update groq.js --- src/models/groq.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/models/groq.js b/src/models/groq.js index 56dbfcd..2c5aba8 100644 --- a/src/models/groq.js +++ b/src/models/groq.js @@ -52,7 +52,6 @@ export class GroqCloudAPI { } // If the model name includes "deepseek-r1", handle the tags - if (this.model_name && this.model_name.toLowerCase().includes("deepseek-r1")) { const hasOpenTag = res.includes(""); const hasCloseTag = res.includes(""); @@ -68,7 +67,6 @@ export class GroqCloudAPI { } // Remove the complete block (and any content inside) from the response res = res.replace(/[\s\S]*?<\/think>/g, '').trim(); - } finalRes = res; break; // Exit the loop once a valid response is obtained @@ -76,7 +74,7 @@ export class GroqCloudAPI { if (finalRes == null) { console.warn("Could not obtain a valid block or normal response after max attempts."); - finalRes = "Response incomplete, please try again."; + finalRes = "I thought too hard, sorry, try again."; } finalRes = finalRes.replace(/<\|separator\|>/g, '*no response*'); @@ -86,4 +84,4 @@ export class GroqCloudAPI { async embed(text) { console.log("There is no support for embeddings in Groq support. However, the following text was provided: " + text); } -} \ No newline at end of file +}