Skip to content

Commit

Permalink
mypy typing
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen15 committed Aug 26, 2024
1 parent d901d88 commit 13aa9fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphiti_core/search/search_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 13aa9fa

Please sign in to comment.