mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
improve image dedup function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user