mirror of
https://git-proxy.hk.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-10 15:50:31 +08:00
Fix: update chunk, empty question issue. (#6800)
### What problem does this PR solve? fix issue #6539, refer to pr #6405 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
b213e88cca
commit
57e760883e
@ -1262,7 +1262,7 @@ def update_chunk(tenant_id, dataset_id, document_id, chunk_id):
|
||||
if "questions" in req:
|
||||
if not isinstance(req["questions"], list):
|
||||
return get_error_data_result("`questions` should be a list")
|
||||
d["question_kwd"] = req.get("questions")
|
||||
d["question_kwd"] = [str(q).strip() for q in req.get("questions", []) if str(q).strip()]
|
||||
d["question_tks"] = rag_tokenizer.tokenize("\n".join(req["questions"]))
|
||||
if "available" in req:
|
||||
d["available_int"] = int(req["available"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user