Skip to content

Commit

Permalink
update qdrant
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Sep 13, 2023
1 parent 44ef5ad commit db11837
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion phi/docker/app/qdrant/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Qdrant(DockerApp):

# -*- Image Configuration
image_name: str = "qdrant/qdrant"
image_tag: str = "v1.3.1"
image_tag: str = "v1.5.1"

# -*- App Ports
# Open a container port if open_port=True
Expand Down
5 changes: 3 additions & 2 deletions phi/vectordb/qdrant/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def doc_exists(self, document: Document) -> bool:
return False

def name_exists(self, name: str) -> bool:
pass
raise NotImplementedError

def insert(self, documents: List[Document], batch_size: int = 10) -> UpdateStatus:
logger.debug(f"Inserting {len(documents)} documents")
points = []
Expand Down Expand Up @@ -143,6 +143,7 @@ def exists(self) -> bool:
if self.client:
collection_info = self.client.get_collection(collection_name=self.collection)
return collection_info.status == CollectionStatus.GREEN
return False

def get_count(self) -> int:
return self.client.count(collection_name=self.collection, exact=True)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ module = [
"sqlalchemy.*",
"textract.*",
"wikipedia.*",
"qdrant_client.*",
]
ignore_missing_imports = true

0 comments on commit db11837

Please sign in to comment.