Преглед изворни кода

fix(api):Fix the issue of empty and not empty operations failing in k… (#24276)

Co-authored-by: liumin <min.liu@tongdun.net>
tags/1.8.0
Amy пре 2 месеци
родитељ
комит
738aaee101
No account linked to committer's email address

+ 1
- 1
api/core/rag/retrieval/dataset_retrieval.py Прегледај датотеку

@@ -1012,7 +1012,7 @@ class DatasetRetrieval:
def _process_metadata_filter_func(
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
):
if value is None:
if value is None and condition not in ("empty", "not empty"):
return

key = f"{metadata_name}_{sequence}"

+ 1
- 1
api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py Прегледај датотеку

@@ -572,7 +572,7 @@ class KnowledgeRetrievalNode(BaseNode):
def _process_metadata_filter_func(
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
):
if value is None:
if value is None and condition not in ("empty", "not empty"):
return

key = f"{metadata_name}_{sequence}"

Loading…
Откажи
Сачувај