Fix docs and config for vector store

This commit is contained in:
Dev-Khant
2024-08-04 21:10:51 +05:30
parent b6cfd960d1
commit b10ec8c34a
3 changed files with 9 additions and 7 deletions

View File

@@ -44,10 +44,6 @@ class Qdrant(VectorStoreBase):
self.client = client
else:
params = {}
if path:
params["path"] = path
if os.path.exists(path) and os.path.isdir(path):
shutil.rmtree(path)
if api_key:
params["api_key"] = api_key
if url:
@@ -55,6 +51,12 @@ class Qdrant(VectorStoreBase):
if host and port:
params["host"] = host
params["port"] = port
if not params:
params["path"] = path
if os.path.exists(path) and os.path.isdir(path):
shutil.rmtree(path)
self.client = QdrantClient(**params)
self.create_col(collection_name, embedding_model_dims)