fix: rebuild web static (#1634)

Co-authored-by: aries_ckt <916701291@qq.com>
This commit is contained in:
magic.chen
2024-06-13 21:03:06 +08:00
committed by GitHub
parent 28c67efbea
commit bb7f41bdba
248 changed files with 62135 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ class CrossEncoderRerankEmbeddings(BaseModel, RerankEmbeddings):
kwargs["client"] = CrossEncoder(
kwargs.get("model_name", "BAAI/bge-reranker-base"),
max_length=kwargs.get("max_length"),
max_length=kwargs.get("max_length"), # type: ignore
**(kwargs.get("model_kwargs") or {}),
)
super().__init__(**kwargs)
@@ -57,7 +57,7 @@ class CrossEncoderRerankEmbeddings(BaseModel, RerankEmbeddings):
rank_scores = _model.predict(sentences=query_content_pairs)
if isinstance(rank_scores, np.ndarray):
rank_scores = rank_scores.tolist()
return rank_scores
return rank_scores # type: ignore
class OpenAPIRerankEmbeddings(BaseModel, RerankEmbeddings):