From d5f6335f99c4da8d9bc01c1364f056ece961a015 Mon Sep 17 00:00:00 2001 From: Stephen Hu Date: Fri, 4 Jul 2025 12:41:28 +0800 Subject: [PATCH] Fix: The data set created by API call failed to parse after uploading the file. (#8657) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/8656 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/svr/task_executor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index a5dfafeca..adcaa4c23 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -445,7 +445,10 @@ async def embedding(docs, mdl, parser_config=None, callback=None): tk_count += c callback(prog=0.7 + 0.2 * (i + 1) / len(cnts), msg="") cnts = cnts_ - title_w = float(parser_config.get("filename_embd_weight", 0.1)) + filename_embd_weight = parser_config.get("filename_embd_weight", 0.1) # due to the db support none value + if not filename_embd_weight: + filename_embd_weight = 0.1 + title_w = float(filename_embd_weight) vects = (title_w * tts + (1 - title_w) * cnts) if len(tts) == len(cnts) else cnts