Add safety valve for path_size set too high

This commit is contained in:
Cyber MacGeddon 2025-03-13 00:33:15 +00:00
parent 7d7b2686f1
commit 59cc86602c

View file

@ -93,6 +93,10 @@ class Query:
if path_length <= 0: if path_length <= 0:
return return
# Stop spanning around if the subgraph is already maxed out
if len(subgraph) >= self.max_subgraph_size:
return
res = self.rag.triples_client.request( res = self.rag.triples_client.request(
user=self.user, collection=self.collection, user=self.user, collection=self.collection,
s=ent, p=None, o=None, s=ent, p=None, o=None,