fix: The local rearrangement model cannot be loaded (#2805)

This commit is contained in:
shaohuzhang1 2025-04-07 11:22:01 +08:00 committed by GitHub
parent 560890f717
commit 867c53984b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class LocalBaseReranker(MaxKBBaseModel, BaseDocumentCompressor):
tokenizer: Any = None
model: Optional[str] = None
cache_dir: Optional[str] = None
model_kwargs: ClassVar = {}
model_kwargs: Any = {}
def __init__(self, model_name, cache_dir=None, **model_kwargs):
super().__init__()

View File

@ -28,7 +28,7 @@ diskcache = "^5.6.3"
pillow = "^10.2.0"
filetype = "^1.2.0"
torch = "2.6.0"
sentence-transformers = "^2.2.2"
sentence-transformers = "^4.0.2"
openai = "^1.13.3"
tiktoken = "^0.7.0"
qianfan = "^0.3.6.1"
@ -66,6 +66,7 @@ pysilk = "^0.0.1"
django-db-connection-pool = "^1.2.5"
opencv-python-headless = "^4.11.0.86"
pymysql = "^1.1.1"
accelerate = "^1.6.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"