From 215e9361ea7fc94453b16d0f524c25d817ede993 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 9 Dec 2024 13:20:58 +0800 Subject: [PATCH] Fix field missing issue. (#3931) ### What problem does this PR solve? #3905 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/svr/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index aed8b7fa4..a8061a817 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -273,7 +273,7 @@ def embedding(docs, mdl, parser_config=None, callback=None): batch_size = 16 tts, cnts = [], [] for d in docs: - tts.append(rmSpace(d["title_tks"])) + tts.append(rmSpace(d.get("docnm_kwd", "Title"))) c = "\n".join(d.get("question_kwd", [])) if not c: c = d["content_with_weight"]