Selaa lähdekoodia

Fix:local_es_tag (#7534)

Two Case when local  Es tag search has result which is filtered by score
1: Doc has empty tag,and not visi LLM
2: Code may use empty examples in Prompt for LLM search tag

Co-authored-by: huangfuqunze <huangfuqunze.hfqz@alibaba-inc.com>
tags/v0.19.0
hfrt456 5 kuukautta sitten
vanhempi
commit
332e6ffbd4
No account linked to committer's email address
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1
    1
      rag/svr/task_executor.py

+ 1
- 1
rag/svr/task_executor.py Näytä tiedosto

@@ -368,7 +368,7 @@ async def build_chunks(task, progress_callback):

docs_to_tag = []
for d in docs:
if settings.retrievaler.tag_content(tenant_id, kb_ids, d, all_tags, topn_tags=topn_tags, S=S):
if settings.retrievaler.tag_content(tenant_id, kb_ids, d, all_tags, topn_tags=topn_tags, S=S) and len(d[TAG_FLD]) > 0:
examples.append({"content": d["content_with_weight"], TAG_FLD: d[TAG_FLD]})
else:
docs_to_tag.append(d)

Loading…
Peruuta
Tallenna