Skip to content

Commit 31ee4d8

Browse files
authored
fix node to object mapping in FGARetriever (#62)
1 parent 74de54a commit 31ee4d8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/auth0-ai-llamaindex/auth0_ai_llamaindex/FGARetriever.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def _async_filter_FGA(
116116
}.values()
117117
)
118118
node_to_obj = {
119-
nodeWithScore: check.object
119+
nodeWithScore.id_: check.object
120120
for check, nodeWithScore in zip(all_checks, nodes)
121121
}
122122

@@ -132,8 +132,8 @@ async def _async_filter_FGA(
132132
return [
133133
node
134134
for node in nodes
135-
if node_to_obj[node] in permissions_map
136-
and permissions_map[node_to_obj[node]]
135+
if node_to_obj[node.id_] in permissions_map
136+
and permissions_map[node_to_obj[node.id_]]
137137
]
138138

139139
async def _aretrieve(self, query_bundle: QueryBundle) -> List[NodeWithScore]:

0 commit comments

Comments
 (0)