We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cbe7a6 commit 516fd33Copy full SHA for 516fd33
tests/integration/test_rerankers.py
@@ -79,10 +79,11 @@ def test_bad_input_cohere(cohereReranker):
79
with pytest.raises(Exception):
80
cohereReranker.rank("valid query", "not a list") # Invalid type for documents
81
82
- with pytest.raises(Exception):
83
- cohereReranker.rank(
84
- "valid query", [{"field": "valid document"}], rank_by=["invalid_field"]
85
- ) # Invalid rank_by field
+ if isinstance(reranker, CohereReranker):
+ with pytest.raises(Exception):
+ reranker.rank(
+ "valid query", [{"field": "valid document"}], rank_by=["invalid_field"]
86
+ ) # Invalid rank_by field
87
88
89
def test_rank_documents_cross_encoder(hfCrossEncoderReranker):
0 commit comments