fix mutiple retrieval component content (#1997)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
H
2024-08-19 15:01:21 +08:00
committed by GitHub
parent 99b634c68d
commit 9065fb1050
3 changed files with 6 additions and 4 deletions

View File

@ -75,8 +75,8 @@ class Retrieval(ComponentBase, ABC):
aggs=False, rerank_mdl=rerank_mdl)
if not kbinfos["chunks"]:
df = Retrieval.be_output(self._param.empty_response)
df["empty_response"] = True
df = Retrieval.be_output("")
df["empty_response"] = self._param.empty_response
return df
df = pd.DataFrame(kbinfos["chunks"])