mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
4.6.4-alpha (#569)
This commit is contained in:
@@ -189,15 +189,6 @@ export async function searchDatasetData(props: SearchProps) {
|
||||
})
|
||||
).filter((item) => item.score > similarity);
|
||||
|
||||
// (It's possible that rerank failed) concat rerank results and search results
|
||||
set = new Set<string>(reRankResults.map((item) => item.id));
|
||||
embeddingRecallResults.forEach((item) => {
|
||||
if (!set.has(item.id) && item.score >= similarity) {
|
||||
reRankResults.push(item);
|
||||
set.add(item.id);
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
searchRes: reRankResults.slice(0, limit),
|
||||
tokenLen
|
||||
@@ -382,7 +373,7 @@ export async function reRankSearchResult({
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
return [];
|
||||
return data;
|
||||
}
|
||||
}
|
||||
// ------------------ search end ------------------
|
||||
|
Reference in New Issue
Block a user