mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
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)
This commit is contained in:
@ -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():
|
||||
|
||||
Reference in New Issue
Block a user