mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
revert: no spam filter
This commit is contained in:
@@ -488,12 +488,12 @@ export async function processURLs(
|
|||||||
|
|
||||||
// check if content is likely a blocked msg from paywall, bot detection, etc.
|
// check if content is likely a blocked msg from paywall, bot detection, etc.
|
||||||
// only check for <5000 char length content as most blocking msg is short
|
// only check for <5000 char length content as most blocking msg is short
|
||||||
// const spamDetectLength = 1000;
|
const spamDetectLength = 300;
|
||||||
// const isGoodContent = data.content.length > spamDetectLength || await classifyText(data.content);
|
const isGoodContent = data.content.length > spamDetectLength || await classifyText(data.content);
|
||||||
// if (!isGoodContent) {
|
if (!isGoodContent) {
|
||||||
// console.error(`Blocked content ${data.content.length}:`, url, data.content.slice(0, spamDetectLength));
|
console.error(`Blocked content ${data.content.length}:`, url, data.content.slice(0, spamDetectLength));
|
||||||
// throw new Error(`Blocked content ${url}`);
|
throw new Error(`Blocked content ${url}`);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Add to knowledge base
|
// Add to knowledge base
|
||||||
allKnowledge.push({
|
allKnowledge.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user