File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def validate_alpha(self) -> Self:
176
176
if ranker == HybridSearchRanker .LINEAR :
177
177
if alpha is None :
178
178
raise ValueError ("alpha must be provided when using the linear ranker" )
179
- if 0.0 <= alpha <= 1.0 :
179
+ if not ( 0.0 <= alpha <= 1.0 ) :
180
180
raise ValueError ("alpha must be between 0 and 1" )
181
181
else :
182
182
if alpha is not None :
Original file line number Diff line number Diff line change @@ -192,6 +192,8 @@ def test_hybrid_retriever_search_text_linear_ranker(
192
192
query_text = "Find me a book about Fremen" ,
193
193
top_k = top_k ,
194
194
effective_search_ratio = effective_search_ratio ,
195
+ ranker = "linear" ,
196
+ alpha = 0.9 ,
195
197
)
196
198
197
199
assert isinstance (results , RetrieverResult )
You can’t perform that action at this time.
0 commit comments