mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 07:09:01 +08:00
fix: empty or contains only empty strings. (#2347)
### What problem does this PR solve? the setting was kept empty for Empty_response. In expectation, this case should get a response from the LLM if can't find the references from the knowledgebase. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)   Co-authored-by: Theta Wang (ncu) <chunshan.connect@gmail.com>
This commit is contained in:
parent
77988fe3c2
commit
7fad48f42c
@ -76,7 +76,8 @@ class Retrieval(ComponentBase, ABC):
|
||||
|
||||
if not kbinfos["chunks"]:
|
||||
df = Retrieval.be_output("")
|
||||
df["empty_response"] = self._param.empty_response
|
||||
if self._param.empty_response and self._param.empty_response.strip():
|
||||
df["empty_response"] = self._param.empty_response
|
||||
return df
|
||||
|
||||
df = pd.DataFrame(kbinfos["chunks"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user