feat: add multi-stages docker and support platform arm (#274)

* feat: add multi-stages docker and support platform arm

* refactor: pre-commit

* fix: raise ImportError (fastembed) instead of auto install

* feat: add dependencies for local llm

* feat: free disk

* feat: update README

* feat: update README

* chore: fix typo

---------

Co-authored-by: cin-niko <niko@cinnamon.is>
This commit is contained in:
kan_cin
2024-09-12 20:25:03 +07:00
committed by GitHub
parent 73a476979e
commit d3fd75297f
6 changed files with 141 additions and 31 deletions

View File

@@ -41,7 +41,10 @@ class FastEmbedEmbeddings(BaseEmbeddings):
@Param.auto()
def client_(self) -> "TextEmbedding":
from fastembed import TextEmbedding
try:
from fastembed import TextEmbedding
except ImportError:
raise ImportError("Please install FastEmbed: `pip install fastembed`")
return TextEmbedding(model_name=self.model_name)

View File

@@ -70,6 +70,9 @@ adv = [
"python-docx>=1.1.0,<1.2",
"tabulate",
"wikipedia>=1.4.0,<1.5",
"sentence-transformers",
"llama-cpp-python<0.2.8",
"fastembed",
]
dev = [
"black",