mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix SILICONFLOW rerank error (#2980)
### What problem does this PR solve? #2977 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -344,6 +344,9 @@ class SILICONFLOWRerank(Base):
|
||||
self.base_url, json=payload, headers=self.headers
|
||||
).json()
|
||||
rank = np.zeros(len(texts), dtype=float)
|
||||
if "results" not in response:
|
||||
return rank, 0
|
||||
|
||||
for d in response["results"]:
|
||||
rank[d["index"]] = d["relevance_score"]
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user