Update bageldb.py (#11421)

I have restructured the code to ensure uniform handling of ImportError.
In place of previously used ValueError, I've adopted the standard
practice of raising ImportError with explanatory messages. This
modification enhances code readability and clarifies that any problems
stem from module importation.
pull/11451/head
Aashish Saini 1 year ago committed by GitHub
parent bfd48925e5
commit 2abbdc6ecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -108,7 +108,7 @@ class Bagel(VectorStore):
try:
import bagel # noqa: F401
except ImportError:
raise ValueError("Please install bagel `pip install betabageldb`.")
raise ImportError("Please install bagel `pip install betabageldb`.")
return self._cluster.find(
query_texts=query_texts,
query_embeddings=query_embeddings,

Loading…
Cancel
Save