mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 20:26:15 +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:
parent
dcb1bd35d0
commit
04af30e3db
@ -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 = [
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user