Skip to content

Commit

Permalink
Fix qdrant remove_training_data api
Browse files Browse the repository at this point in the history
Return `True` for successful deletion
  • Loading branch information
AlbertoLanaro authored Jun 4, 2024
1 parent 246bbe5 commit 4cdd976
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vanna/qdrant/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import pandas as pd
from qdrant_client import QdrantClient, grpc, models
from qdrant_client.http.models.models import UpdateStatus

from ..base import VannaBase
from ..utils import deterministic_uuid
Expand Down Expand Up @@ -210,7 +211,8 @@ def get_training_data(self, **kwargs) -> pd.DataFrame:
def remove_training_data(self, id: str, **kwargs) -> bool:
try:
id, collection_name = self._parse_point_id(id)
self._client.delete(collection_name, points_selector=[id])
res = self._client.delete(collection_name, points_selector=[id])
res == UpdateStatus.COMPLETED
except ValueError:
return False

Expand Down

0 comments on commit 4cdd976

Please sign in to comment.