fix: fix set_parse_model property in async (#583)

* fix: fix set_parse_model property in async

* fix: fix remaining async methods
This commit is contained in:
George
2024-04-10 18:48:19 +02:00
committed by George Panchuk
parent 79acb74c7c
commit cbefb5a43e
2 changed files with 6 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ class AsyncQdrantFastembedMixin(AsyncQdrantBase):
)
self._embedding_model_name = embedding_model_name
async def set_sparse_model(
def set_sparse_model(
self,
embedding_model_name: Optional[str],
cache_dir: Optional[str] = None,
@@ -241,7 +241,7 @@ class AsyncQdrantFastembedMixin(AsyncQdrantBase):
model_name = self.embedding_model_name.split("/")[-1].lower()
return f"fast-{model_name}"
async def get_sparse_vector_field_name(self) -> Optional[str]:
def get_sparse_vector_field_name(self) -> Optional[str]:
"""
Returns name of the vector field in qdrant collection, used by current fastembed model.
Returns:
@@ -360,7 +360,7 @@ class AsyncQdrantFastembedMixin(AsyncQdrantBase):
)
}
async def get_fastembed_sparse_vector_params(
def get_fastembed_sparse_vector_params(
self, on_disk: Optional[bool] = None
) -> Optional[Dict[str, models.SparseVectorParams]]:
"""

View File

@@ -54,8 +54,11 @@ if __name__ == "__main__":
keep_sync=[
"__init__",
"set_model",
"set_sparse_model",
"get_vector_field_name",
"get_sparse_vector_field_name",
"get_fastembed_vector_params",
"get_fastembed_sparse_vector_params",
"embedding_model_name",
"sparse_embedding_model_name",
],