From db118372123f31962c26b52bf430aa94506cfc16 Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Wed, 13 Sep 2023 11:00:52 +0100 Subject: [PATCH] update qdrant --- phi/docker/app/qdrant/qdrant.py | 2 +- phi/vectordb/qdrant/qdrant.py | 5 +++-- pyproject.toml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/phi/docker/app/qdrant/qdrant.py b/phi/docker/app/qdrant/qdrant.py index 13cdea04a..e1412ec7d 100644 --- a/phi/docker/app/qdrant/qdrant.py +++ b/phi/docker/app/qdrant/qdrant.py @@ -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 diff --git a/phi/vectordb/qdrant/qdrant.py b/phi/vectordb/qdrant/qdrant.py index 3d241b314..47e632614 100644 --- a/phi/vectordb/qdrant/qdrant.py +++ b/phi/vectordb/qdrant/qdrant.py @@ -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 = [] @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 3aba01800..c32299e34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,5 +103,6 @@ module = [ "sqlalchemy.*", "textract.*", "wikipedia.*", + "qdrant_client.*", ] ignore_missing_imports = true