File tree Expand file tree Collapse file tree
vectordb_bench/backend/clients/qdrant_cloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from typing import TypeVar
2+
13from pydantic import BaseModel , SecretStr , validator
2- from qdrant_client .http .models import QuantizationSearchParams , SearchParams
34
45from ..api import DBCaseConfig , DBConfig , MetricType
56
7+ # define type "SearchParams"
8+ SearchParams = TypeVar ("SearchParams" )
9+
610
711# Allowing `api_key` to be left empty, to ensure compatibility with the open-source Qdrant.
812class QdrantConfig (DBConfig ):
@@ -72,6 +76,9 @@ def index_param(self) -> dict:
7276 return {"distance" : self .parse_metric ()}
7377
7478 def search_param (self ) -> SearchParams :
79+ # Import while in use
80+ from qdrant_client .http .models import QuantizationSearchParams , SearchParams
81+
7582 quantization = (
7683 QuantizationSearchParams (
7784 ignore = False ,
You can’t perform that action at this time.
0 commit comments