From 21a62130c8ebde8de3dacc581ce6c49b0d53d7b0 Mon Sep 17 00:00:00 2001 From: buua436 <66937541+buua436@users.noreply.github.com> Date: Tue, 14 Oct 2025 09:32:13 +0800 Subject: [PATCH] Fix: empty references in agent conversation (#10528) ### What problem does this PR solve? issue: #10495 change: fix empty references in agent conversation ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/prompts/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/prompts/generator.py b/rag/prompts/generator.py index eda3e89ec..d2762ec91 100644 --- a/rag/prompts/generator.py +++ b/rag/prompts/generator.py @@ -124,7 +124,7 @@ def kb_prompt(kbinfos, max_tokens, hash_id=False): knowledges = [] for i, ck in enumerate(kbinfos["chunks"][:chunks_num]): - cnt = "\nID: {}".format(i if not hash_id else hash_str2int(get_value(ck, "id", "chunk_id"), 100)) + cnt = "\nID: {}".format(i if not hash_id else hash_str2int(get_value(ck, "id", "chunk_id"), 500)) cnt += draw_node("Title", get_value(ck, "docnm_kwd", "document_name")) cnt += draw_node("URL", ck['url']) if "url" in ck else "" for k, v in docs.get(get_value(ck, "doc_id", "document_id"), {}).items():