Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdeleong committed Aug 26, 2024
1 parent c871dc4 commit 04933a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions retrieval_service/datastore/providers/neo4j_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
import csv
from typing import Any, Literal, Optional

import models
from neo4j import AsyncDriver, AsyncGraphDatabase
from pydantic import BaseModel

import models

from .. import datastore

NEO4J_IDENTIFIER = "neo4j"
Expand Down Expand Up @@ -220,8 +221,8 @@ async def amenities_search(
) -> list[dict]:
async with self.__driver.session() as session:
# OPTIONAL ensures that all similar amenities are returned even if they lack a SIMILAR_TO relationship
# Limit retrieval to 2 target nodes related to the source node, linked by SIMILAR_TO relationship
# Lower case relationship due to graph generator output
# Retrieve up to 2 source nodes along with all nodes connected by the SIMILAR_TO relationship
# Use lowercase relationship names to align with the graph generator's output format
# Similarity scores are bounded between 0 and 1, scores closer to 1 indicating higher similarity
result = await session.run(
"""
Expand Down

0 comments on commit 04933a6

Please sign in to comment.