From 13aa9fac67cc838722fc6ba51cbff1b7d9743239 Mon Sep 17 00:00:00 2001 From: prestonrasmussen Date: Mon, 26 Aug 2024 17:50:26 -0400 Subject: [PATCH] mypy typing --- graphiti_core/search/search_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphiti_core/search/search_utils.py b/graphiti_core/search/search_utils.py index feeb7580..55530d7e 100644 --- a/graphiti_core/search/search_utils.py +++ b/graphiti_core/search/search_utils.py @@ -333,7 +333,7 @@ async def get_relevant_edges( # takes in a list of rankings of uuids def rrf(results: list[list[str]], rank_const=1) -> list[str]: - scores: dict[str, int] = defaultdict(int) + scores: dict[str, float] = defaultdict(int) for result in results: for i, uuid in enumerate(result): scores[uuid] += 1 / (i + rank_const) @@ -349,7 +349,7 @@ def rrf(results: list[list[str]], rank_const=1) -> list[str]: async def node_distance_reranker( driver: AsyncDriver, results: list[list[str]], center_node_uuid: str ) -> list[str]: - scores: dict[str, int] = {} + scores: dict[str, float] = {} for result in results: for uuid in result: