mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 22:46:07 +08:00
add doc ids in API: completion (#827)
### What problem does this PR solve? #808 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
a1586e0af9
commit
b3c923da6b
@ -118,7 +118,9 @@ def chat(dialog, messages, stream=True, **kwargs):
|
||||
else:
|
||||
kbinfos = retrievaler.retrieval(" ".join(questions), embd_mdl, dialog.tenant_id, dialog.kb_ids, 1, dialog.top_n,
|
||||
dialog.similarity_threshold,
|
||||
dialog.vector_similarity_weight, top=1024, aggs=False)
|
||||
dialog.vector_similarity_weight,
|
||||
doc_ids=kwargs.get("doc_ids", "").split(","),
|
||||
top=1024, aggs=False)
|
||||
knowledges = [ck["content_with_weight"] for ck in kbinfos["chunks"]]
|
||||
chat_logger.info(
|
||||
"{}->{}".format(" ".join(questions), "\n->".join(knowledges)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user