Skip to content

Commit b46a305

Browse files
authored
Merge pull request #591 from aurelio-labs/fix/sim-score
fix: sim score
2 parents e7882be + 56a1dc0 commit b46a305

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

semantic_router/routers/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ async def _async_pass_routes(
724724
route.llm = self.llm
725725
# TODO need to move to asyncio tasks and gather
726726
route_choice = await route.acall(query=text)
727+
if route_choice is not None and route_choice.similarity_score is None:
728+
route_choice.similarity_score = total_score
727729
passed_routes.append(route_choice)
728730
elif passed and route is not None and simulate_static:
729731
passed_routes.append(

0 commit comments

Comments
 (0)