mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-25 22:16:49 +08:00
improve image dedup function
This commit is contained in:
parent
f48436229d
commit
6979031eac
@ -134,6 +134,10 @@ export const dedupImagesWithEmbeddings = (
|
||||
similarityThreshold: number = 0.86, // Default similarity threshold
|
||||
): ImageObject[] => {
|
||||
try {
|
||||
if (newImages.length === 0) {
|
||||
logWarning('No new images provided for deduplication');
|
||||
return [];
|
||||
}
|
||||
// Quick return for single new image with no existing images
|
||||
if (newImages.length === 1 && existingImages.length === 0) {
|
||||
return newImages;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user