mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 03:46:00 +08:00
add quota config in dialog conf (#339)
### What problem does this PR solve? Issue link:#337 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
73285d9d07
commit
bc6828c45f
@ -60,7 +60,7 @@ def list():
|
|||||||
for id in sres.ids:
|
for id in sres.ids:
|
||||||
d = {
|
d = {
|
||||||
"chunk_id": id,
|
"chunk_id": id,
|
||||||
"content_with_weight": rmSpace(sres.highlight[id]) if question else sres.field[id].get(
|
"content_with_weight": rmSpace(sres.highlight[id]) if question and id in sres.highlight else sres.field[id].get(
|
||||||
"content_with_weight", ""),
|
"content_with_weight", ""),
|
||||||
"doc_id": sres.field[id]["doc_id"],
|
"doc_id": sres.field[id]["doc_id"],
|
||||||
"docnm_kwd": sres.field[id]["docnm_kwd"],
|
"docnm_kwd": sres.field[id]["docnm_kwd"],
|
||||||
|
@ -241,7 +241,7 @@ def chat(dialog, messages, **kwargs):
|
|||||||
chat_logger.info("User: {}|Assistant: {}".format(
|
chat_logger.info("User: {}|Assistant: {}".format(
|
||||||
msg[-1]["content"], answer))
|
msg[-1]["content"], answer))
|
||||||
|
|
||||||
if knowledges:
|
if knowledges and prompt_config.get("quote", True):
|
||||||
answer, idx = retrievaler.insert_citations(answer,
|
answer, idx = retrievaler.insert_citations(answer,
|
||||||
[ck["content_ltks"]
|
[ck["content_ltks"]
|
||||||
for ck in kbinfos["chunks"]],
|
for ck in kbinfos["chunks"]],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user