Fix: no effect on retrieval_test in term of metadata filter. (#9566)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-08-19 18:57:35 +08:00
committed by GitHub
parent e15e39f183
commit d0dc56166c
3 changed files with 26 additions and 5 deletions

View File

@ -771,10 +771,11 @@ def ask(question, kb_ids, tenant_id, chat_llm_name=None, search_config={}):
def gen_mindmap(question, kb_ids, tenant_id, search_config={}):
meta_data_filter = search_config.get("meta_data_filter", {})
doc_ids = search_config.get("doc_ids", [])
kb_ids = search_config.get("doc_ids", kb_ids)
rerank_id = search_config.get("rerank_id", "")
rerank_mdl = None
kbs = KnowledgebaseService.get_by_ids(kb_ids)
if not kbs:
return {"error": "No KB selected"}
embedding_list = list(set([kb.embd_id for kb in kbs]))
tenant_ids = list(set([kb.tenant_id for kb in kbs]))