mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-16 18:05:52 +08:00
Fix generate param empty_response (#2010)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
73a03287a5
commit
8d2f8ed561
@ -67,7 +67,8 @@ class Generate(ComponentBase):
|
||||
|
||||
def set_cite(self, retrieval_res, answer):
|
||||
retrieval_res.dropna(subset=["vector", "content_ltks"], inplace=True)
|
||||
retrieval_res["empty_response"].fillna("", inplace=True)
|
||||
if "empty_response" in retrieval_res.columns:
|
||||
retrieval_res["empty_response"].fillna("", inplace=True)
|
||||
answer, idx = retrievaler.insert_citations(answer, [ck["content_ltks"] for _, ck in retrieval_res.iterrows()],
|
||||
[ck["vector"] for _, ck in retrieval_res.iterrows()],
|
||||
LLMBundle(self._canvas.get_tenant_id(), LLMType.EMBEDDING,
|
||||
|
Loading…
x
Reference in New Issue
Block a user