mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
feat: add hostnames bw filter
This commit is contained in:
parent
d48629d50d
commit
9048cb75fb
@ -712,7 +712,11 @@ But then you realized you have asked them before. You decided to to think out of
|
||||
const qOnly = keywordsQueries.filter(q => q.q).map(q => q.q)
|
||||
// avoid exisitng searched queries
|
||||
const uniqQOnly = chooseK((await dedupQueries(qOnly, allKeywords, context.tokenTracker)).unique_queries, MAX_QUERIES_PER_STEP);
|
||||
keywordsQueries = uniqQOnly.map(q => keywordsQueries.find(kq => kq.q === q)) as SERPQuery[];
|
||||
keywordsQueries = keywordsQueries = uniqQOnly.map(q => {
|
||||
const matches = keywordsQueries.filter(kq => kq.q === q);
|
||||
// if there are multiple matches, keep the original query as the wider search
|
||||
return matches.length > 1 ? {q} : matches[0];
|
||||
}) as SERPQuery[];
|
||||
|
||||
let anyResult = false;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user