Skip to content
Snippets Groups Projects
Commit 7862d39d authored by James Briggs's avatar James Briggs
Browse files

fix: missing assertion logic

parent 0b72dfb2
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,13 @@ class TestIndexEncoders:
encoder = encoder_cls()
index = init_index(index_cls, index_name=encoder.__class__.__name__)
route_layer = router_cls(encoder=encoder, index=index)
assert route_layer.score_threshold == encoder.score_threshold
if isinstance(route_layer, HybridRouter):
assert (
route_layer.score_threshold
== encoder.score_threshold * route_layer.alpha
)
else:
assert route_layer.score_threshold == encoder.score_threshold
def test_initialization_no_encoder(self, index_cls, encoder_cls, router_cls):
os.environ["OPENAI_API_KEY"] = "test_api_key"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment