Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

when qwen rerank model not return ok, raise exception to notice user (#3593)

liwenju0875096384bd7
diff --git a/rag/llm/rerank_model.py b/rag/llm/rerank_model.py
index 58ea0decbf..e2eb3a93db 100644
--- a/rag/llm/rerank_model.py
+++ b/rag/llm/rerank_model.py
@@ -452,4 +452,5 @@ class QWenRerank(Base):
for r in resp.output.results:
rank[r.index] = r.relevance_score
return rank, resp.usage.total_tokens
- return rank, 0
\ No newline at end of file
+ else:
+ raise ValueError(f"Error calling QWenRerank model {self.model_name}: {resp.status_code} - {resp.text}")