Fix: rerank with vllm issue. (#6306)

### What problem does this PR solve?

#6301

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-03-20 11:52:42 +08:00 committed by GitHub
parent 4eb3a8e1cc
commit 5b04b7d972
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,7 +382,7 @@ class CoHereRerank(Base):
from cohere import Client
self.client = Client(api_key=key, base_url=base_url)
self.model_name = model_name
self.model_name = model_name.split("___")[0]
def similarity(self, query: str, texts: list):
token_count = num_tokens_from_string(query) + sum(