Skip to content
Snippets Groups Projects
Unverified Commit 50806ba5 authored by Anush's avatar Anush Committed by GitHub
Browse files

chore(deps): bump Fastembed to latest (#11329)

parent 7d93b49f
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ import numpy as np ...@@ -4,7 +4,7 @@ import numpy as np
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.bridge.pydantic import Field, PrivateAttr
from fastembed.embedding import FlagEmbedding from fastembed import TextEmbedding
class FastEmbedEmbedding(BaseEmbedding): class FastEmbedEmbedding(BaseEmbedding):
...@@ -51,10 +51,8 @@ class FastEmbedEmbedding(BaseEmbedding): ...@@ -51,10 +51,8 @@ class FastEmbedEmbedding(BaseEmbedding):
doc_embed_type: Literal["default", "passage"] = Field( doc_embed_type: Literal["default", "passage"] = Field(
"default", "default",
description="Type of embedding to use for documents.\n" description="Type of embedding method to use for documents.\n"
"'default': Uses FastEmbed's default embedding method.\n" "Available options are 'default' and 'passage'.",
"'passage': Prefixes the text with 'passage' before embedding.\n"
"Defaults to 'default'.",
) )
_model: Any = PrivateAttr() _model: Any = PrivateAttr()
...@@ -78,7 +76,7 @@ class FastEmbedEmbedding(BaseEmbedding): ...@@ -78,7 +76,7 @@ class FastEmbedEmbedding(BaseEmbedding):
doc_embed_type=doc_embed_type, doc_embed_type=doc_embed_type,
) )
self._model = FlagEmbedding( self._model = TextEmbedding(
model_name=model_name, model_name=model_name,
max_length=max_length, max_length=max_length,
cache_dir=cache_dir, cache_dir=cache_dir,
......
...@@ -32,7 +32,7 @@ version = "0.1.3" ...@@ -32,7 +32,7 @@ version = "0.1.3"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.8.1,<3.12" python = ">=3.8.1,<3.12"
llama-index-core = "^0.10.11.post1" llama-index-core = "^0.10.11.post1"
fastembed = "^0.1.3" fastembed = "^0.2.2"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
ipython = "8.10.0" ipython = "8.10.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment