Selaa lähdekoodia

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)
tags/v0.1.0
KevinHuSh 1 vuosi sitten
vanhempi
commit
bc6828c45f
No account linked to committer's email address
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1
    1
      api/apps/chunk_app.py
  2. 1
    1
      api/apps/conversation_app.py

+ 1
- 1
api/apps/chunk_app.py Näytä tiedosto

@@ -60,7 +60,7 @@ def list():
for id in sres.ids:
d = {
"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", ""),
"doc_id": sres.field[id]["doc_id"],
"docnm_kwd": sres.field[id]["docnm_kwd"],

+ 1
- 1
api/apps/conversation_app.py Näytä tiedosto

@@ -241,7 +241,7 @@ def chat(dialog, messages, **kwargs):
chat_logger.info("User: {}|Assistant: {}".format(
msg[-1]["content"], answer))
if knowledges:
if knowledges and prompt_config.get("quote", True):
answer, idx = retrievaler.insert_citations(answer,
[ck["content_ltks"]
for ck in kbinfos["chunks"]],

Loading…
Peruuta
Tallenna