nsarrazin HF staff commited on
Commit
cbf4205
1 Parent(s): 89f9b29

Fix multi domains for assistants (#929)

Browse files
src/lib/server/websearch/runWebSearch.ts CHANGED
@@ -79,12 +79,12 @@ export async function runWebSearch(
79
  if (ragSettings && ragSettings?.allowedDomains.length > 0) {
80
  appendUpdate("Filtering on specified domains");
81
  webSearch.searchQuery +=
82
- " " + ragSettings.allowedDomains.map((item) => "site:" + item).join(" ");
83
  }
84
 
85
  // handle the global lists
86
  webSearch.searchQuery +=
87
- allowList.map((item) => "site:" + item).join(" ") +
88
  " " +
89
  blockList.map((item) => "-site:" + item).join(" ");
90
 
 
79
  if (ragSettings && ragSettings?.allowedDomains.length > 0) {
80
  appendUpdate("Filtering on specified domains");
81
  webSearch.searchQuery +=
82
+ " " + ragSettings.allowedDomains.map((item) => "site:" + item).join(" OR ");
83
  }
84
 
85
  // handle the global lists
86
  webSearch.searchQuery +=
87
+ allowList.map((item) => "site:" + item).join(" OR ") +
88
  " " +
89
  blockList.map((item) => "-site:" + item).join(" ");
90