fix: dependencies (#416)

This commit is contained in:
cachho
2023-08-24 23:23:25 +02:00
committed by GitHub
parent d8d0e0e5d1
commit ed319531bf
6 changed files with 16 additions and 50 deletions

View File

@@ -50,4 +50,10 @@ class OpenSourceAppConfig(BaseAppConfig):
:returns: The default embedding function
"""
return embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
try:
return embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
except ValueError as e:
print(e)
raise ModuleNotFoundError(
"The open source app requires extra dependencies. Install with `pip install embedchain[opensource]`"
) from None