mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-11-30 00:46:21 +00:00
Fix kb isolation infinity conn (#9913)
### What problem does this PR solve? This PR fixes a critical bug in the knowledge base isolation feature where chat responses were referencing documents from incorrect knowledge bases. The issue was in the `infinity_conn.py` file where the `equivalent_condition_to_str()` function was incorrectly skipping `kb_id` filtering, causing documents from unintended knowledge bases to be included in search results. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Syed Shahmeer Ali <ashahmeer73@gmail.com> Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
parent
1f7a035340
commit
982ec24fa7
@ -67,7 +67,7 @@ def equivalent_condition_to_str(condition: dict, table_instance=None) -> str | N
|
||||
|
||||
cond = list()
|
||||
for k, v in condition.items():
|
||||
if not isinstance(k, str) or k in ["kb_id"] or not v:
|
||||
if not isinstance(k, str) or not v:
|
||||
continue
|
||||
if field_keyword(k):
|
||||
if isinstance(v, list):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user