mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
907cf61da7
commit
50c3be2136
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,9 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
if (mergedDocuments.every((doc) => doc.distance !== undefined)) {
|
if (mergedDocuments.every((doc) => doc.distance !== undefined)) {
|
||||||
mergedDocuments.sort((a, b) => (a.distance ?? Infinity) - (b.distance ?? Infinity));
|
mergedDocuments = mergedDocuments.sort(
|
||||||
|
(a, b) => (b.distance ?? Infinity) - (a.distance ?? Infinity)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue