mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix:ERROR 20 Method rag.nlp.search.Dealer.search() parameter highlight="None" violates type hint bool | list, as <class "builtins.NoneType"> "None" not list or bool. (#10743)
### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/10733 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -72,9 +72,12 @@ class Dealer:
|
|||||||
def search(self, req, idx_names: str | list[str],
|
def search(self, req, idx_names: str | list[str],
|
||||||
kb_ids: list[str],
|
kb_ids: list[str],
|
||||||
emb_mdl=None,
|
emb_mdl=None,
|
||||||
highlight: bool | list = False,
|
highlight: bool | list | None = None,
|
||||||
rank_feature: dict | None = None
|
rank_feature: dict | None = None
|
||||||
):
|
):
|
||||||
|
if highlight is None:
|
||||||
|
highlight = False
|
||||||
|
|
||||||
filters = self.get_filters(req)
|
filters = self.get_filters(req)
|
||||||
orderBy = OrderByExpr()
|
orderBy = OrderByExpr()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user