mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +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
|
similarityThreshold: number = 0.86, // Default similarity threshold
|
||||||
): ImageObject[] => {
|
): ImageObject[] => {
|
||||||
try {
|
try {
|
||||||
|
if (newImages.length === 0) {
|
||||||
|
logWarning('No new images provided for deduplication');
|
||||||
|
return [];
|
||||||
|
}
|
||||||
// Quick return for single new image with no existing images
|
// Quick return for single new image with no existing images
|
||||||
if (newImages.length === 1 && existingImages.length === 0) {
|
if (newImages.length === 1 && existingImages.length === 0) {
|
||||||
return newImages;
|
return newImages;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user