mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-29 11:09:07 +00:00
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.
This commit is contained in:
parent
bfd48925e5
commit
2abbdc6ecb
@ -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…
Reference in New Issue
Block a user