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.source_description AS source_description,
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):
if driver.provider == GraphProvider.NEPTUNE:
await driver.save_to_aoss( # pyright: ignore reportAttributeAccessIssue
'communities',
'community_name',
[{'name': self.name, 'uuid': self.uuid, 'group_id': self.group_id}],
)
result = await driver.execute_query(

View file

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