Skip to content

Commit a044ab4

Browse files
author
jiangzhijie
committed
run reformat
1 parent 7f3b8e0 commit a044ab4

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

api/core/rag/datasource/vdb/lindorm/lindorm_vector.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -354,17 +354,17 @@ def default_text_mapping(dimension: int, method_name: str, **kwargs: Any) -> dic
354354

355355

356356
def default_text_search_query(
357-
query_text: str,
358-
k: int = 4,
359-
text_field: str = Field.CONTENT_KEY.value,
360-
must: Optional[list[dict]] = None,
361-
must_not: Optional[list[dict]] = None,
362-
should: Optional[list[dict]] = None,
363-
minimum_should_match: int = 0,
364-
filters: Optional[list[dict]] = None,
365-
routing: Optional[str] = None,
366-
routing_field: Optional[str] = None,
367-
**kwargs,
357+
query_text: str,
358+
k: int = 4,
359+
text_field: str = Field.CONTENT_KEY.value,
360+
must: Optional[list[dict]] = None,
361+
must_not: Optional[list[dict]] = None,
362+
should: Optional[list[dict]] = None,
363+
minimum_should_match: int = 0,
364+
filters: Optional[list[dict]] = None,
365+
routing: Optional[str] = None,
366+
routing_field: Optional[str] = None,
367+
**kwargs,
368368
) -> dict:
369369
if routing is not None:
370370
query_clause = {
@@ -410,17 +410,17 @@ def default_text_search_query(
410410

411411

412412
def default_vector_search_query(
413-
query_vector: list[float],
414-
k: int = 4,
415-
min_score: str = "0.0",
416-
ef_search: Optional[str] = None, # only for hnsw
417-
nprobe: Optional[str] = None, # "2000"
418-
reorder_factor: Optional[str] = None, # "20"
419-
client_refactor: Optional[str] = None, # "true"
420-
vector_field: str = Field.VECTOR.value,
421-
filters: Optional[list[dict]] = None,
422-
filter_type: Optional[str] = None,
423-
**kwargs,
413+
query_vector: list[float],
414+
k: int = 4,
415+
min_score: str = "0.0",
416+
ef_search: Optional[str] = None, # only for hnsw
417+
nprobe: Optional[str] = None, # "2000"
418+
reorder_factor: Optional[str] = None, # "20"
419+
client_refactor: Optional[str] = None, # "true"
420+
vector_field: str = Field.VECTOR.value,
421+
filters: Optional[list[dict]] = None,
422+
filter_type: Optional[str] = None,
423+
**kwargs,
424424
) -> dict:
425425
if filters is not None:
426426
filter_type = "post_filter" if filter_type is None else filter_type
@@ -491,7 +491,7 @@ def init_vector(self, dataset: Dataset, attributes: list, embeddings: Embeddings
491491
"index_type": index_type,
492492
"dimension": dimension,
493493
"distance_type": distance_type,
494-
"using_ugc": using_ugc
494+
"using_ugc": using_ugc,
495495
}
496496
dataset.index_struct = json.dumps(index_struct_dict)
497497
if using_ugc:

0 commit comments

Comments
 (0)