From fdfa5d0ad414f1628ceacd158fa22140d7849e51 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Wed, 24 Jul 2024 14:10:45 +0800 Subject: [PATCH] fix graph bug about second retrieval (#1688) ### What problem does this PR solve? #1651 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- graph/component/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graph/component/base.py b/graph/component/base.py index b424d226f..06574e32d 100644 --- a/graph/component/base.py +++ b/graph/component/base.py @@ -470,7 +470,10 @@ class ComponentBase(ABC): break if upstream_outs: - return pd.concat(upstream_outs, ignore_index=False) + df = pd.concat(upstream_outs, ignore_index=True) + if "content" in df: + df = df.drop_duplicates(subset=['content']).reset_index(drop=True) + return df return pd.DataFrame() def get_stream_input(self):