Fix: huggingface rerank model issue. (#6385)

### What problem does this PR solve?

#6348

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-03-21 12:43:32 +08:00
committed by GitHub
parent bc58ecbfd7
commit d83911b632
2 changed files with 3 additions and 3 deletions

View File

@ -537,7 +537,7 @@ class HuggingfaceRerank(DefaultRerank):
return np.array(scores)
def __init__(self, key, model_name="BAAI/bge-reranker-v2-m3", base_url="http://127.0.0.1"):
self.model_name = model_name
self.model_name = model_name.split("___")[0]
self.base_url = base_url
def similarity(self, query: str, texts: list) -> tuple[np.ndarray, int]: