mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-01 17:16:51 +00:00
Fix CrossEncoderRanker (#1531)
Co-authored-by: dong <dongzhancai@iie2.com> Co-authored-by: Zhancai Dong <dongzhancai1@jd.com>
This commit is contained in:
@@ -239,6 +239,8 @@ class CrossEncoderRanker(Ranker):
|
||||
Returns:
|
||||
List[Chunk], reranked candidates
|
||||
"""
|
||||
if len(candidates_with_scores) <= 1:
|
||||
return candidates_with_scores
|
||||
contents = [candidate.content for candidate in candidates_with_scores]
|
||||
query_content_pairs = [
|
||||
[
|
||||
|
Reference in New Issue
Block a user