bug fixes

This commit is contained in:
Aidan Petti 2025-11-25 07:59:29 -07:00
parent 573a7d7851
commit afeed82a6a
3 changed files with 6 additions and 6 deletions

View file

@ -122,7 +122,7 @@ EPISODIC_NODE_RETURN_NEPTUNE = """
e.group_id AS group_id, e.group_id AS group_id,
e.source_description AS source_description, e.source_description AS source_description,
e.source AS source, e.source AS source,
split(e.entity_edges, ",") AS entity_edges split(e.entity_edges, "|") AS entity_edges
""" """

View file

@ -595,7 +595,7 @@ class CommunityNode(Node):
async def save(self, driver: GraphDriver): async def save(self, driver: GraphDriver):
if driver.provider == GraphProvider.NEPTUNE: if driver.provider == GraphProvider.NEPTUNE:
await driver.save_to_aoss( # pyright: ignore reportAttributeAccessIssue await driver.save_to_aoss( # pyright: ignore reportAttributeAccessIssue
'communities', 'community_name',
[{'name': self.name, 'uuid': self.uuid, 'group_id': self.group_id}], [{'name': self.name, 'uuid': self.uuid, 'group_id': self.group_id}],
) )
result = await driver.execute_query( result = await driver.execute_query(

View file

@ -1075,7 +1075,7 @@ async def community_similarity_search(
comm.name AS name, comm.name AS name,
comm.created_at AS created_at, comm.created_at AS created_at,
comm.summary AS summary, comm.summary AS summary,
comm.name_embedding AS name_embedding [x IN split(comm.name_embedding, ",") | toFloat(x)] AS name_embedding
ORDER BY i.score DESC ORDER BY i.score DESC
LIMIT $limit LIMIT $limit
""" """
@ -1887,7 +1887,7 @@ async def get_embeddings_for_nodes(
WHERE n.uuid IN $node_uuids WHERE n.uuid IN $node_uuids
RETURN DISTINCT RETURN DISTINCT
n.uuid AS uuid, n.uuid AS uuid,
split(n.name_embedding, ",") AS name_embedding [x IN split(n.name_embedding, ",") | toFloat(x)] AS name_embedding
""" """
else: else:
query = """ query = """
@ -1922,7 +1922,7 @@ async def get_embeddings_for_communities(
WHERE c.uuid IN $community_uuids WHERE c.uuid IN $community_uuids
RETURN DISTINCT RETURN DISTINCT
c.uuid AS uuid, c.uuid AS uuid,
split(c.name_embedding, ",") AS name_embedding [x IN split(c.name_embedding, ",") | toFloat(x)] AS name_embedding
""" """
else: else:
query = """ query = """
@ -1959,7 +1959,7 @@ async def get_embeddings_for_edges(
WHERE e.uuid IN $edge_uuids WHERE e.uuid IN $edge_uuids
RETURN DISTINCT RETURN DISTINCT
e.uuid AS uuid, e.uuid AS uuid,
split(e.fact_embedding, ",") AS fact_embedding [x IN split(e.fact_embedding, ",") | toFloat(x)] AS fact_embedding
""" """
else: else:
match_query = """ match_query = """