From f318342c8e6cd6954f61c64451e462ef5bfc6539 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 14 Jan 2025 12:05:20 +0800 Subject: [PATCH] Recalling the file uploaded while chatting. (#4472) ### What problem does this PR solve? #4445 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/db/services/document_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/db/services/document_service.py b/api/db/services/document_service.py index a4de7b977..69e13ba14 100644 --- a/api/db/services/document_service.py +++ b/api/db/services/document_service.py @@ -570,7 +570,7 @@ def doc_upload_and_parse(conversation_id, file_objs, user_id): "kb_id": [kb.id], "docnm_kwd": doc_nm[doc_id], "title_tks": rag_tokenizer.tokenize(re.sub(r"\.[a-zA-Z]+$", "", doc_nm[doc_id])), - "content_ltks": "", + "content_ltks": rag_tokenizer.tokenize("summary summarize 总结 概况 file 文件 概括"), "content_with_weight": mind_map, "knowledge_graph_kwd": "mind_map" })