From e65513a12e1d5cc977765ce2129d2ed24b467acf Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Tue, 17 Jun 2025 01:01:55 -0500 Subject: [PATCH] Added reasoning logging. --- modules/ExpressionSearchFilter.jsm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ExpressionSearchFilter.jsm b/modules/ExpressionSearchFilter.jsm index ca4c0fd..3b8a042 100644 --- a/modules/ExpressionSearchFilter.jsm +++ b/modules/ExpressionSearchFilter.jsm @@ -217,10 +217,12 @@ class ClassificationTerm extends CustomerTermBase { } else { const result = JSON.parse(xhr.responseText); const rawText = result.choices?.[0]?.text || ""; + const thinkText = rawText.match(/[\s\S]*?<\/think>/gi)?.join('') || ''; const cleanedText = rawText.replace(/[\s\S]*?<\/think>/gi, "").trim(); const obj = JSON.parse(cleanedText); matched = obj.matched === true || obj.match === true; console.log(`[ai-filter][ExpressionSearchFilter] Received response:`, result); + console.log('[ai-filter][ExpressionSearchFilter] тоб Reasoning: ', thinkText); console.log(`[ai-filter][ExpressionSearchFilter] Caching:`, key); this.cache.set(key, matched);